Comments (2)
Thank you for the feedback! That were my thoughts exactly, and I've just released v1.2.0 which does exactly that:
You can configure a rotating logfile for the default logger with logzero.logfile(..)
:
logzero.logfile("/tmp/rotating-logfile.log", maxBytes=1000000, backupCount=3)
Or for a specific logger with setup_logger(..)
:
logger = logzero.setup_logger(logfile="/tmp/rotating-logfile2.log", maxBytes=10, backupCount=3)
What do you think?
from logzero.
Looks working, thank you :)
from logzero.
Related Issues (20)
- No Color for Critical Log Level HOT 2
- [RFE] - Create directory structure, if it doesn't exist
- Date Format Missing HOT 1
- Use logzero as root_logger. HOT 3
- Usage with multiprocessing and single rotated logfile HOT 4
- log content when subprocess.Popen another Python code file HOT 1
- How to show output logzero's log in pytest
- Is there a way to use use "logging.setLoggerClass" HOT 1
- setup_logger() with level set cannot be changed HOT 1
- Inconsistent output in console and logfile.
- To do & Feature ideas 💡 HOT 3
- [Feature Request] Handling multiple arguments and non-string arguments HOT 2
- Logfile JSON encode HOT 2
- logzero in multiple files using import
- setup_default_logger of para maxBytes, backupCount not used HOT 2
- [Suggestion/Discussion] Support for `logging.getLogger(__name__)` HOT 2
- Json Formatter overridden by _get_json_formatter HOT 1
- color in filelog is in a mess HOT 2
- Function 'logfile' assumes that filename is a string
- VS Code intellisense stops working from Pylance 2022.2.4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from logzero.