Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log in a file too #13

Closed
Rahe opened this issue Nov 18, 2015 · 1 comment
Closed

Log in a file too #13

Rahe opened this issue Nov 18, 2015 · 1 comment

Comments

@Rahe
Copy link

Rahe commented Nov 18, 2015

Hi,

When i'm logging, i'm logging in a file for being able to store all the results of an import and check everything was fine, this can be usefull especially if the import is something automated.

For this I'm using this script of my creation https://github.com/BeAPI/bea-logger, it works like yours (logging levels etc.) .
Maybe implementing something like this can be usefull ?

Thanks for the work on this subject :)

@rmccue
Copy link
Member

rmccue commented Nov 18, 2015

The logger interface here is actually PSR-3-compatible, so you can use existing projects here like monolog with no trouble. :)

Specifically for this use case, if you're running the importer from the command line, tee is incredibly helpful:

wp wxr-importer import file.xml | tee import.log

This will output the log to stdout as it goes, as well as saving a copy to the file. :)

Once we get the admin UI working in #1, logging to a file is probably something we'll want to do too. I'll definitely keep it in mind. Thanks for the comment!

@rmccue rmccue closed this as completed Nov 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants