Comments (3)
Yes the log messages are filtered against log level once at the point of
entry, and then are propagated to parents.
Perhaps /additivity/ functionality can help you implement what you want?
A logger that is set as non-additive, does not forward messages to parent
loggers at all. (These are intended for big packages that want to have their
own log files).
For example if you set your search-tips and e-shop loggers as non-additive, none of
their messages will appear in appenders attached to the root logger.
You can set them non-additive by adding :own or :noadditive flag to (log:config)
in the same place where you add the rolling file appender.
If that is not flexible enough, then what you want is to have an appender that
filters on log level. Interestingly enough Log4J has this functionality but
since I never used it personally nor known anyone who used it, I thought it
was over-design and did not implement it in log4cl.
Regards,
Max
At Fri, 23 Aug 2013 03:18:15 -0700,
naryl wrote:
I have several packages with different log levels writing to different files and I create a file appender for root logger which
should write all ERROR messages from all loggers to error.log. Currently messages are only filtered by the logger they're
initiated at so if one package's logger is set to DEBUG root logger would write debug messages to error.log even if it's set to
ERROR.Here's my (log:config)
ROOT, ERROR
|
+-(1)-#<DAILY-FILE-APPENDER {131D9559}>
| with #<PATTERN-LAYOUT {EC39B39}>
| :conversion-pattern
| "%&%<{nopretty}%I%;<;;>;-5p [%D{%H:%M:%S}] %g{}{}{:downcase} (%C{}{ }{:downcase})%2.2N - %:%m%>%n"
| :immediate-flush NIL
| :flush-interval 1
| :stream-owner T
| :rollover-check-period 60
| :name-format #P"/home/naryl/eshop-logs/eshop.log"
| :backup-name-format NIL
| :utc NIL
| :message-count 2962
|
+-ESHOP, DEBUG
| |
| +-(1)-#<THIS-CONSOLE-APPENDER {131E4B31}>
| with #<PATTERN-LAYOUT {BB97C89}>
| :conversion-pattern
| "%&%<{nopretty}%I%;<;;>;-5p [%D{%H:%M:%S}] %g{}{}{:downcase} (%C{}{ }{:downcase})%2.2N - %:%m%>%n"
| :immediate-flush NIL
| :flush-interval 1
| :stream-owner NIL
| :stream #<SB-SYS:FD-STREAM for "the terminal" {B322409}>
| :message-count 2962
|
+-SEARCH-TIPS, TRACE
|
+-(1)-#<DAILY-FILE-APPENDER {11BC4DE9}>
with #<PATTERN-LAYOUT {11BC2651}>
:conversion-pattern
"%&%<%I%;<;;>;-5p [%D{%H:%M:%S}] %g{}{}{:downcase}%:; ;F (%C{}{ }{:downcase})%2.2N - %:_%m%>%n"
:immediate-flush NIL
:flush-interval 1
:stream-owner T
:rollover-check-period 60
:name-format "/home/naryl/eshop-logs/search-tips.log"
:backup-name-format NIL
:utc NIL
:message-count 0—
Reply to this email directly or view it on GitHub.*
from log4cl.
Ok, mark it invalid. I'll write a level-filtering appender.
from log4cl.
Cool, it should be a one liner :around method for APPENDER-DO-APPEND for a quick fix.
If you happen to implement a larger patch, with LOG:CONFIG hookup for it, I
would gladly merge it, something like. (LOG:CONFIG ...stuff that adds an
appender... :filter :error). Adding a filter slot to base appender class is
good too, making it NIL by default.
At Fri, 23 Aug 2013 04:28:21 -0700,
naryl wrote:
[1 <text/plain; UTF-8 (7bit)>]
[2 <text/html; UTF-8 (7bit)>]
Ok, mark it invalid. I'll write a level-filtering appender.—
Reply to this email directly or view it on GitHub.*
from log4cl.
Related Issues (20)
- Log4Slime Elisp side fails to detect numeric EQL specializer
- public API changed: log:config :daily doesn't accept a pathname anymore, only strings HOT 2
- Log4slime Error Upon Startup (org-compatible-face) HOT 5
- log expansion should not capture stream HOT 2
- Add syntax sugar for logging macros to drop innermost level of auto-naming
- Should serialized-appender use a recursive lock? HOT 6
- slime error message when loading log4cl HOT 1
- log4cl not detecting existing package name
- dependency on sb-posix is not declared HOT 2
- problem on ABCL HOT 2
- Consider using Conium rather than SWANK-BACKEND
- Troubles with log4slime HOT 2
- log4cl:project-options doesn't work. HOT 1
- Unable to install `Log4Slime`
- I haven't thanked you enough. HOT 1
- JOIN-THREAD-ERROR HOT 3
- Recursive lock attempt with `log4cl`
- PLEASE REPORT BUGS IN MAINTAINED FORK https://github.com/sharplispers/log4cl
- Sly integration HOT 1
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 log4cl.