Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

logging to file only #63

Closed
mgiaco opened this issue Nov 21, 2017 · 2 comments
Closed

logging to file only #63

mgiaco opened this issue Nov 21, 2017 · 2 comments

Comments

@mgiaco
Copy link

mgiaco commented Nov 21, 2017

Hi,

Is there a way to log to file only.

So I taught the level is the log level for the console and fileLoglevel is the level for the file. If I set
this here:

my_logger = setup_logger(logfile=path, maxBytes=1024 * 1024, backupCount=3, level=logging.ERROR,
                                         fileLoglevel=logging.INFO)

it dose not work. I use
my_logger.info(...

but nothing is printed to the file. So there is something wrong with level and file level I think.

So I would like to use logzero as a file logger only parallel to the the normal python logger. Do you see any problem here?

cheers
mathias

@mgiaco
Copy link
Author

mgiaco commented Nov 21, 2017

Ah sorry this is the same error as #57

@mgiaco mgiaco closed this as completed Nov 21, 2017
@metachris
Copy link
Owner

Yeah, it's currently not possible to easily remove the console handler. You could still go through the handlers manually and remove it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants