How to disable/ set logging level /preferences PER Mac OS X application?
I find my Mac's syslogd "Cosole" logs become unusable when some badly written app (PathFinder.app in this case) incessantly spews into syslogd all day long.. I read somewhere that you could disable logging PER app by..
Creating an alias to the executable bundle inside the App "package", and then ONLY launching that alias FROM the terminal. The process was... Browse to /Applications/ObnoxiousLogger.app, right click, "Show Package Contents", and then Browse to...
/Applications/ObnoxiousLogger.app/Contents/MacOS/ObnoxiousLogger
Then you make the alias through the GUI and remember to always launch the app from that alias, again ONLY via the terminal.
This is annoying, as you HAVE to create the alias via the Finder (symlinking doesn't work, and there is no way to create an alias via the terminal). And if it gets launched ANY other way, youre back to square one, logorrhea.. This method DID work, but for a very short amount of time.
It would seem you could set this via a launchctl command, or a plist variable, but this isn't an app that is opened by launchd, and launchd's documentation is so all-over the place, but I guess this is a possibility, I suppose.
I saw something about sending the log to /dev/null, but it wasn't clear if this was some kind of syslogd pipe, or command, or an /etc/syslogd.conf setting, or what...
Please let me know if you have a surefire way to selectively silence logging per application, or even better, increase or decrease the logging verbosity, per process / command, etc in Mac OS X.
macos console launchd syslogd asl
add a comment |
I find my Mac's syslogd "Cosole" logs become unusable when some badly written app (PathFinder.app in this case) incessantly spews into syslogd all day long.. I read somewhere that you could disable logging PER app by..
Creating an alias to the executable bundle inside the App "package", and then ONLY launching that alias FROM the terminal. The process was... Browse to /Applications/ObnoxiousLogger.app, right click, "Show Package Contents", and then Browse to...
/Applications/ObnoxiousLogger.app/Contents/MacOS/ObnoxiousLogger
Then you make the alias through the GUI and remember to always launch the app from that alias, again ONLY via the terminal.
This is annoying, as you HAVE to create the alias via the Finder (symlinking doesn't work, and there is no way to create an alias via the terminal). And if it gets launched ANY other way, youre back to square one, logorrhea.. This method DID work, but for a very short amount of time.
It would seem you could set this via a launchctl command, or a plist variable, but this isn't an app that is opened by launchd, and launchd's documentation is so all-over the place, but I guess this is a possibility, I suppose.
I saw something about sending the log to /dev/null, but it wasn't clear if this was some kind of syslogd pipe, or command, or an /etc/syslogd.conf setting, or what...
Please let me know if you have a surefire way to selectively silence logging per application, or even better, increase or decrease the logging verbosity, per process / command, etc in Mac OS X.
macos console launchd syslogd asl
Consider accepting answers to your questions if they solve the issue by clicking the checkmark next to them, or alternatively edit your questions or comment on answers why they don't work for you.
– Daniel Beck♦
Jun 5 '11 at 16:43
add a comment |
I find my Mac's syslogd "Cosole" logs become unusable when some badly written app (PathFinder.app in this case) incessantly spews into syslogd all day long.. I read somewhere that you could disable logging PER app by..
Creating an alias to the executable bundle inside the App "package", and then ONLY launching that alias FROM the terminal. The process was... Browse to /Applications/ObnoxiousLogger.app, right click, "Show Package Contents", and then Browse to...
/Applications/ObnoxiousLogger.app/Contents/MacOS/ObnoxiousLogger
Then you make the alias through the GUI and remember to always launch the app from that alias, again ONLY via the terminal.
This is annoying, as you HAVE to create the alias via the Finder (symlinking doesn't work, and there is no way to create an alias via the terminal). And if it gets launched ANY other way, youre back to square one, logorrhea.. This method DID work, but for a very short amount of time.
It would seem you could set this via a launchctl command, or a plist variable, but this isn't an app that is opened by launchd, and launchd's documentation is so all-over the place, but I guess this is a possibility, I suppose.
I saw something about sending the log to /dev/null, but it wasn't clear if this was some kind of syslogd pipe, or command, or an /etc/syslogd.conf setting, or what...
Please let me know if you have a surefire way to selectively silence logging per application, or even better, increase or decrease the logging verbosity, per process / command, etc in Mac OS X.
macos console launchd syslogd asl
I find my Mac's syslogd "Cosole" logs become unusable when some badly written app (PathFinder.app in this case) incessantly spews into syslogd all day long.. I read somewhere that you could disable logging PER app by..
Creating an alias to the executable bundle inside the App "package", and then ONLY launching that alias FROM the terminal. The process was... Browse to /Applications/ObnoxiousLogger.app, right click, "Show Package Contents", and then Browse to...
/Applications/ObnoxiousLogger.app/Contents/MacOS/ObnoxiousLogger
Then you make the alias through the GUI and remember to always launch the app from that alias, again ONLY via the terminal.
This is annoying, as you HAVE to create the alias via the Finder (symlinking doesn't work, and there is no way to create an alias via the terminal). And if it gets launched ANY other way, youre back to square one, logorrhea.. This method DID work, but for a very short amount of time.
It would seem you could set this via a launchctl command, or a plist variable, but this isn't an app that is opened by launchd, and launchd's documentation is so all-over the place, but I guess this is a possibility, I suppose.
I saw something about sending the log to /dev/null, but it wasn't clear if this was some kind of syslogd pipe, or command, or an /etc/syslogd.conf setting, or what...
Please let me know if you have a surefire way to selectively silence logging per application, or even better, increase or decrease the logging verbosity, per process / command, etc in Mac OS X.
macos console launchd syslogd asl
macos console launchd syslogd asl
edited May 18 '11 at 17:54
Daniel Beck♦
93.1k12234288
93.1k12234288
asked May 2 '11 at 22:17
mralexgraymralexgray
5232520
5232520
Consider accepting answers to your questions if they solve the issue by clicking the checkmark next to them, or alternatively edit your questions or comment on answers why they don't work for you.
– Daniel Beck♦
Jun 5 '11 at 16:43
add a comment |
Consider accepting answers to your questions if they solve the issue by clicking the checkmark next to them, or alternatively edit your questions or comment on answers why they don't work for you.
– Daniel Beck♦
Jun 5 '11 at 16:43
Consider accepting answers to your questions if they solve the issue by clicking the checkmark next to them, or alternatively edit your questions or comment on answers why they don't work for you.
– Daniel Beck♦
Jun 5 '11 at 16:43
Consider accepting answers to your questions if they solve the issue by clicking the checkmark next to them, or alternatively edit your questions or comment on answers why they don't work for you.
– Daniel Beck♦
Jun 5 '11 at 16:43
add a comment |
5 Answers
5
active
oldest
votes
You may want to look at asl.conf(5)
which allows you to ignore/process log messages on quite a fine-grained level.
Something like:
? [= Sender ObnoxiousLogger] ignore
should do the trick. If you still want to see the more serious messages from the obnoxious sender, something along the lines of:
? [= Sender ObnoxiousLogger] [> Level error] ignore
might be more appropriate.
Note: after editing /etc/asl.conf
, don't forget to kill -HUP
your syslogd.
Thx for asl.conf. An ObnoxiousLogger can have an even severer effect than "stealing CPU": Preventing system sleep, as those frequent disk writes continuously reset the sleep timer! My culprit is Google Chrome, both on Mac & Win. I hope it's an innocent bug. But it's hard to believe: 1) Having users online all the time is a mayor business goal, as online-time==ad-time. Tempting to achieve this by tempering with the device sleep mechanism… 2) A Chrome bug reported 2012-07-28 still not fixed.
– porg
Aug 7 '14 at 11:17
My system.log contains unwanted lines in this format:<date> <hostname> <sender>: <function or object id> <message>
<sender> comes in different flavors:[some kind of hexadecimal id].com.google.Chrome[decimal PID]
Google Chrome[decimal PID]
Q.1) How do I match Google Chrome as sender within conf.asl? Used? [= Sender <sendername>] ignore
. As <sendername> I tried:Chrome, Google Chrome, "Google Chrome", com.google.Chrome, .com.google.Chrome
Q.2) What's the correct commandline to notify syslogd? Usedsudo kill -HUP pidOfMySylogd
. What shall be the exit code? In my case it was nil.
– porg
Aug 7 '14 at 11:47
add a comment |
Just create a File » New Database Search…, looking for Facility contains "console
" and Sender does not contain "ObnoxiousLogger
", and ignore the default Console Messages database search?
You can use the following command to set individual log filtering levels for specific processes:
syslog -c processname -d
This will set the log level of currently running instances of processname
to all messages of debug level or higher. the possible levels are each character of pacewnid
: (Panic), Alert, Critical, Error, Warning, Notice, Info, and Debug.
So, to only enable logging of warning messages and higher for Finder, use:
syslog -c Finder -w
You will need to repeat this whenever you restart the process in question.
I have similar searches setup for just stuff I want to see.. but is there any way to prevent "ObnoxiousLogger" from ever hitting the syslog facility, at all? My concern: all that chatter must be robbing at least a few cpu cycles, no?
– mralexgray
May 19 '11 at 16:38
@mralexgray Added some further research to my answer. Unfortunately, I don't have an obnoxiously logging process running right now, so I cannot perform any reliable testing. Answer is therefore primarily based onman syslog
.
– Daniel Beck♦
May 19 '11 at 17:32
add a comment |
The proposed solution by Torsten doesn't seem to work. It seems adding those configuration to the global asl.conf
doesn't have the expected effect the way the rules are handled.
A solution to this problem, I found, after I almost went berserk fighting with the main asl.conf, is to use separate asl/*
configuration files for each filter. Those files must be stored in /etc/asl/
e.g. to ignore "com.example.Sender" and filter its log spam from system.log we could create a file /etc/asl/com.example.Sender
with the following content:
? [= Sender com.example.Sender] claim only
* ignore
The claim only
for the match (a "Sender" in the example) causes the rules in the master asl.conf
to be ignored which means things won't end up in system.log
.
Don't forget to restart syslogd
, of course.
add a comment |
I posted a more detailed answer at AskDifferent.
Put in /etc/asl.conf
a rule like the following
? [= Sender foobar] [<= Level error] notify com.apple.foobar
op key value op key value
-----query 1----- -----query 2---- ---------action--------
In order to ignore messages in both system.log
and in Console.app
, you should add rules to ignore messages before the following comment in asl.conf
.
# Flat file configurations formerly in syslog.conf
Example with modifier S
, which ignores messages matching that substring from SIMBL Agent
.
? [= Sender SIMBL Agent] [S= Message warning: failed to get scripting definition from] ignore
op -key-- ---value--- mod --key-- --------------------value-----------------------
--------query 1------- -----------------------query 2------------------------------- action
After adding a rule restart the daemon with sudo killall HUP syslogd
.
Tested successfully in OS X 10.8.5.
add a comment |
I am on MacOS Mojave (10.14.3) and this post was helpful to me so I want to clarify what worked for me as I have not seen it all together in a single place. In my case I wanted to filter out Microsoft OneNote messages which were constantly spamming my system.log file at a rate of 5 a second. Sample message:
Feb 3 22:52:49 MyMacMini-2 Microsoft OneNote[393]: [ACT]:[TASKSCHEDULER]:[Info]:opQueue=0x6000012d7760 after call to waitUntilAllOperationsAreFinished
So I edited /etc/asl.conf with the following rule:
# Disable Microsoft OneNote logging as is filling up system.log!
? [= Sender Microsoft OneNote] ignore
You need to add this before the line that says:
# Rules for /var/log/system.log
As otherwise it will not work. Then just restart syslogd with this command and the messages should be gone from system.log:
sudo killall -HUP syslogd
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f278231%2fhow-to-disable-set-logging-level-preferences-per-mac-os-x-application%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
You may want to look at asl.conf(5)
which allows you to ignore/process log messages on quite a fine-grained level.
Something like:
? [= Sender ObnoxiousLogger] ignore
should do the trick. If you still want to see the more serious messages from the obnoxious sender, something along the lines of:
? [= Sender ObnoxiousLogger] [> Level error] ignore
might be more appropriate.
Note: after editing /etc/asl.conf
, don't forget to kill -HUP
your syslogd.
Thx for asl.conf. An ObnoxiousLogger can have an even severer effect than "stealing CPU": Preventing system sleep, as those frequent disk writes continuously reset the sleep timer! My culprit is Google Chrome, both on Mac & Win. I hope it's an innocent bug. But it's hard to believe: 1) Having users online all the time is a mayor business goal, as online-time==ad-time. Tempting to achieve this by tempering with the device sleep mechanism… 2) A Chrome bug reported 2012-07-28 still not fixed.
– porg
Aug 7 '14 at 11:17
My system.log contains unwanted lines in this format:<date> <hostname> <sender>: <function or object id> <message>
<sender> comes in different flavors:[some kind of hexadecimal id].com.google.Chrome[decimal PID]
Google Chrome[decimal PID]
Q.1) How do I match Google Chrome as sender within conf.asl? Used? [= Sender <sendername>] ignore
. As <sendername> I tried:Chrome, Google Chrome, "Google Chrome", com.google.Chrome, .com.google.Chrome
Q.2) What's the correct commandline to notify syslogd? Usedsudo kill -HUP pidOfMySylogd
. What shall be the exit code? In my case it was nil.
– porg
Aug 7 '14 at 11:47
add a comment |
You may want to look at asl.conf(5)
which allows you to ignore/process log messages on quite a fine-grained level.
Something like:
? [= Sender ObnoxiousLogger] ignore
should do the trick. If you still want to see the more serious messages from the obnoxious sender, something along the lines of:
? [= Sender ObnoxiousLogger] [> Level error] ignore
might be more appropriate.
Note: after editing /etc/asl.conf
, don't forget to kill -HUP
your syslogd.
Thx for asl.conf. An ObnoxiousLogger can have an even severer effect than "stealing CPU": Preventing system sleep, as those frequent disk writes continuously reset the sleep timer! My culprit is Google Chrome, both on Mac & Win. I hope it's an innocent bug. But it's hard to believe: 1) Having users online all the time is a mayor business goal, as online-time==ad-time. Tempting to achieve this by tempering with the device sleep mechanism… 2) A Chrome bug reported 2012-07-28 still not fixed.
– porg
Aug 7 '14 at 11:17
My system.log contains unwanted lines in this format:<date> <hostname> <sender>: <function or object id> <message>
<sender> comes in different flavors:[some kind of hexadecimal id].com.google.Chrome[decimal PID]
Google Chrome[decimal PID]
Q.1) How do I match Google Chrome as sender within conf.asl? Used? [= Sender <sendername>] ignore
. As <sendername> I tried:Chrome, Google Chrome, "Google Chrome", com.google.Chrome, .com.google.Chrome
Q.2) What's the correct commandline to notify syslogd? Usedsudo kill -HUP pidOfMySylogd
. What shall be the exit code? In my case it was nil.
– porg
Aug 7 '14 at 11:47
add a comment |
You may want to look at asl.conf(5)
which allows you to ignore/process log messages on quite a fine-grained level.
Something like:
? [= Sender ObnoxiousLogger] ignore
should do the trick. If you still want to see the more serious messages from the obnoxious sender, something along the lines of:
? [= Sender ObnoxiousLogger] [> Level error] ignore
might be more appropriate.
Note: after editing /etc/asl.conf
, don't forget to kill -HUP
your syslogd.
You may want to look at asl.conf(5)
which allows you to ignore/process log messages on quite a fine-grained level.
Something like:
? [= Sender ObnoxiousLogger] ignore
should do the trick. If you still want to see the more serious messages from the obnoxious sender, something along the lines of:
? [= Sender ObnoxiousLogger] [> Level error] ignore
might be more appropriate.
Note: after editing /etc/asl.conf
, don't forget to kill -HUP
your syslogd.
edited Aug 10 '11 at 16:11
3498DB
15.8k114762
15.8k114762
answered Aug 10 '11 at 9:25
Torsten GrustTorsten Grust
6614
6614
Thx for asl.conf. An ObnoxiousLogger can have an even severer effect than "stealing CPU": Preventing system sleep, as those frequent disk writes continuously reset the sleep timer! My culprit is Google Chrome, both on Mac & Win. I hope it's an innocent bug. But it's hard to believe: 1) Having users online all the time is a mayor business goal, as online-time==ad-time. Tempting to achieve this by tempering with the device sleep mechanism… 2) A Chrome bug reported 2012-07-28 still not fixed.
– porg
Aug 7 '14 at 11:17
My system.log contains unwanted lines in this format:<date> <hostname> <sender>: <function or object id> <message>
<sender> comes in different flavors:[some kind of hexadecimal id].com.google.Chrome[decimal PID]
Google Chrome[decimal PID]
Q.1) How do I match Google Chrome as sender within conf.asl? Used? [= Sender <sendername>] ignore
. As <sendername> I tried:Chrome, Google Chrome, "Google Chrome", com.google.Chrome, .com.google.Chrome
Q.2) What's the correct commandline to notify syslogd? Usedsudo kill -HUP pidOfMySylogd
. What shall be the exit code? In my case it was nil.
– porg
Aug 7 '14 at 11:47
add a comment |
Thx for asl.conf. An ObnoxiousLogger can have an even severer effect than "stealing CPU": Preventing system sleep, as those frequent disk writes continuously reset the sleep timer! My culprit is Google Chrome, both on Mac & Win. I hope it's an innocent bug. But it's hard to believe: 1) Having users online all the time is a mayor business goal, as online-time==ad-time. Tempting to achieve this by tempering with the device sleep mechanism… 2) A Chrome bug reported 2012-07-28 still not fixed.
– porg
Aug 7 '14 at 11:17
My system.log contains unwanted lines in this format:<date> <hostname> <sender>: <function or object id> <message>
<sender> comes in different flavors:[some kind of hexadecimal id].com.google.Chrome[decimal PID]
Google Chrome[decimal PID]
Q.1) How do I match Google Chrome as sender within conf.asl? Used? [= Sender <sendername>] ignore
. As <sendername> I tried:Chrome, Google Chrome, "Google Chrome", com.google.Chrome, .com.google.Chrome
Q.2) What's the correct commandline to notify syslogd? Usedsudo kill -HUP pidOfMySylogd
. What shall be the exit code? In my case it was nil.
– porg
Aug 7 '14 at 11:47
Thx for asl.conf. An ObnoxiousLogger can have an even severer effect than "stealing CPU": Preventing system sleep, as those frequent disk writes continuously reset the sleep timer! My culprit is Google Chrome, both on Mac & Win. I hope it's an innocent bug. But it's hard to believe: 1) Having users online all the time is a mayor business goal, as online-time==ad-time. Tempting to achieve this by tempering with the device sleep mechanism… 2) A Chrome bug reported 2012-07-28 still not fixed.
– porg
Aug 7 '14 at 11:17
Thx for asl.conf. An ObnoxiousLogger can have an even severer effect than "stealing CPU": Preventing system sleep, as those frequent disk writes continuously reset the sleep timer! My culprit is Google Chrome, both on Mac & Win. I hope it's an innocent bug. But it's hard to believe: 1) Having users online all the time is a mayor business goal, as online-time==ad-time. Tempting to achieve this by tempering with the device sleep mechanism… 2) A Chrome bug reported 2012-07-28 still not fixed.
– porg
Aug 7 '14 at 11:17
My system.log contains unwanted lines in this format:
<date> <hostname> <sender>: <function or object id> <message>
<sender> comes in different flavors: [some kind of hexadecimal id].com.google.Chrome[decimal PID]
Google Chrome[decimal PID]
Q.1) How do I match Google Chrome as sender within conf.asl? Used ? [= Sender <sendername>] ignore
. As <sendername> I tried: Chrome, Google Chrome, "Google Chrome", com.google.Chrome, .com.google.Chrome
Q.2) What's the correct commandline to notify syslogd? Used sudo kill -HUP pidOfMySylogd
. What shall be the exit code? In my case it was nil.– porg
Aug 7 '14 at 11:47
My system.log contains unwanted lines in this format:
<date> <hostname> <sender>: <function or object id> <message>
<sender> comes in different flavors: [some kind of hexadecimal id].com.google.Chrome[decimal PID]
Google Chrome[decimal PID]
Q.1) How do I match Google Chrome as sender within conf.asl? Used ? [= Sender <sendername>] ignore
. As <sendername> I tried: Chrome, Google Chrome, "Google Chrome", com.google.Chrome, .com.google.Chrome
Q.2) What's the correct commandline to notify syslogd? Used sudo kill -HUP pidOfMySylogd
. What shall be the exit code? In my case it was nil.– porg
Aug 7 '14 at 11:47
add a comment |
Just create a File » New Database Search…, looking for Facility contains "console
" and Sender does not contain "ObnoxiousLogger
", and ignore the default Console Messages database search?
You can use the following command to set individual log filtering levels for specific processes:
syslog -c processname -d
This will set the log level of currently running instances of processname
to all messages of debug level or higher. the possible levels are each character of pacewnid
: (Panic), Alert, Critical, Error, Warning, Notice, Info, and Debug.
So, to only enable logging of warning messages and higher for Finder, use:
syslog -c Finder -w
You will need to repeat this whenever you restart the process in question.
I have similar searches setup for just stuff I want to see.. but is there any way to prevent "ObnoxiousLogger" from ever hitting the syslog facility, at all? My concern: all that chatter must be robbing at least a few cpu cycles, no?
– mralexgray
May 19 '11 at 16:38
@mralexgray Added some further research to my answer. Unfortunately, I don't have an obnoxiously logging process running right now, so I cannot perform any reliable testing. Answer is therefore primarily based onman syslog
.
– Daniel Beck♦
May 19 '11 at 17:32
add a comment |
Just create a File » New Database Search…, looking for Facility contains "console
" and Sender does not contain "ObnoxiousLogger
", and ignore the default Console Messages database search?
You can use the following command to set individual log filtering levels for specific processes:
syslog -c processname -d
This will set the log level of currently running instances of processname
to all messages of debug level or higher. the possible levels are each character of pacewnid
: (Panic), Alert, Critical, Error, Warning, Notice, Info, and Debug.
So, to only enable logging of warning messages and higher for Finder, use:
syslog -c Finder -w
You will need to repeat this whenever you restart the process in question.
I have similar searches setup for just stuff I want to see.. but is there any way to prevent "ObnoxiousLogger" from ever hitting the syslog facility, at all? My concern: all that chatter must be robbing at least a few cpu cycles, no?
– mralexgray
May 19 '11 at 16:38
@mralexgray Added some further research to my answer. Unfortunately, I don't have an obnoxiously logging process running right now, so I cannot perform any reliable testing. Answer is therefore primarily based onman syslog
.
– Daniel Beck♦
May 19 '11 at 17:32
add a comment |
Just create a File » New Database Search…, looking for Facility contains "console
" and Sender does not contain "ObnoxiousLogger
", and ignore the default Console Messages database search?
You can use the following command to set individual log filtering levels for specific processes:
syslog -c processname -d
This will set the log level of currently running instances of processname
to all messages of debug level or higher. the possible levels are each character of pacewnid
: (Panic), Alert, Critical, Error, Warning, Notice, Info, and Debug.
So, to only enable logging of warning messages and higher for Finder, use:
syslog -c Finder -w
You will need to repeat this whenever you restart the process in question.
Just create a File » New Database Search…, looking for Facility contains "console
" and Sender does not contain "ObnoxiousLogger
", and ignore the default Console Messages database search?
You can use the following command to set individual log filtering levels for specific processes:
syslog -c processname -d
This will set the log level of currently running instances of processname
to all messages of debug level or higher. the possible levels are each character of pacewnid
: (Panic), Alert, Critical, Error, Warning, Notice, Info, and Debug.
So, to only enable logging of warning messages and higher for Finder, use:
syslog -c Finder -w
You will need to repeat this whenever you restart the process in question.
edited May 19 '11 at 17:30
answered May 18 '11 at 17:53
Daniel Beck♦Daniel Beck
93.1k12234288
93.1k12234288
I have similar searches setup for just stuff I want to see.. but is there any way to prevent "ObnoxiousLogger" from ever hitting the syslog facility, at all? My concern: all that chatter must be robbing at least a few cpu cycles, no?
– mralexgray
May 19 '11 at 16:38
@mralexgray Added some further research to my answer. Unfortunately, I don't have an obnoxiously logging process running right now, so I cannot perform any reliable testing. Answer is therefore primarily based onman syslog
.
– Daniel Beck♦
May 19 '11 at 17:32
add a comment |
I have similar searches setup for just stuff I want to see.. but is there any way to prevent "ObnoxiousLogger" from ever hitting the syslog facility, at all? My concern: all that chatter must be robbing at least a few cpu cycles, no?
– mralexgray
May 19 '11 at 16:38
@mralexgray Added some further research to my answer. Unfortunately, I don't have an obnoxiously logging process running right now, so I cannot perform any reliable testing. Answer is therefore primarily based onman syslog
.
– Daniel Beck♦
May 19 '11 at 17:32
I have similar searches setup for just stuff I want to see.. but is there any way to prevent "ObnoxiousLogger" from ever hitting the syslog facility, at all? My concern: all that chatter must be robbing at least a few cpu cycles, no?
– mralexgray
May 19 '11 at 16:38
I have similar searches setup for just stuff I want to see.. but is there any way to prevent "ObnoxiousLogger" from ever hitting the syslog facility, at all? My concern: all that chatter must be robbing at least a few cpu cycles, no?
– mralexgray
May 19 '11 at 16:38
@mralexgray Added some further research to my answer. Unfortunately, I don't have an obnoxiously logging process running right now, so I cannot perform any reliable testing. Answer is therefore primarily based on
man syslog
.– Daniel Beck♦
May 19 '11 at 17:32
@mralexgray Added some further research to my answer. Unfortunately, I don't have an obnoxiously logging process running right now, so I cannot perform any reliable testing. Answer is therefore primarily based on
man syslog
.– Daniel Beck♦
May 19 '11 at 17:32
add a comment |
The proposed solution by Torsten doesn't seem to work. It seems adding those configuration to the global asl.conf
doesn't have the expected effect the way the rules are handled.
A solution to this problem, I found, after I almost went berserk fighting with the main asl.conf, is to use separate asl/*
configuration files for each filter. Those files must be stored in /etc/asl/
e.g. to ignore "com.example.Sender" and filter its log spam from system.log we could create a file /etc/asl/com.example.Sender
with the following content:
? [= Sender com.example.Sender] claim only
* ignore
The claim only
for the match (a "Sender" in the example) causes the rules in the master asl.conf
to be ignored which means things won't end up in system.log
.
Don't forget to restart syslogd
, of course.
add a comment |
The proposed solution by Torsten doesn't seem to work. It seems adding those configuration to the global asl.conf
doesn't have the expected effect the way the rules are handled.
A solution to this problem, I found, after I almost went berserk fighting with the main asl.conf, is to use separate asl/*
configuration files for each filter. Those files must be stored in /etc/asl/
e.g. to ignore "com.example.Sender" and filter its log spam from system.log we could create a file /etc/asl/com.example.Sender
with the following content:
? [= Sender com.example.Sender] claim only
* ignore
The claim only
for the match (a "Sender" in the example) causes the rules in the master asl.conf
to be ignored which means things won't end up in system.log
.
Don't forget to restart syslogd
, of course.
add a comment |
The proposed solution by Torsten doesn't seem to work. It seems adding those configuration to the global asl.conf
doesn't have the expected effect the way the rules are handled.
A solution to this problem, I found, after I almost went berserk fighting with the main asl.conf, is to use separate asl/*
configuration files for each filter. Those files must be stored in /etc/asl/
e.g. to ignore "com.example.Sender" and filter its log spam from system.log we could create a file /etc/asl/com.example.Sender
with the following content:
? [= Sender com.example.Sender] claim only
* ignore
The claim only
for the match (a "Sender" in the example) causes the rules in the master asl.conf
to be ignored which means things won't end up in system.log
.
Don't forget to restart syslogd
, of course.
The proposed solution by Torsten doesn't seem to work. It seems adding those configuration to the global asl.conf
doesn't have the expected effect the way the rules are handled.
A solution to this problem, I found, after I almost went berserk fighting with the main asl.conf, is to use separate asl/*
configuration files for each filter. Those files must be stored in /etc/asl/
e.g. to ignore "com.example.Sender" and filter its log spam from system.log we could create a file /etc/asl/com.example.Sender
with the following content:
? [= Sender com.example.Sender] claim only
* ignore
The claim only
for the match (a "Sender" in the example) causes the rules in the master asl.conf
to be ignored which means things won't end up in system.log
.
Don't forget to restart syslogd
, of course.
edited Aug 8 '16 at 0:16
answered Aug 8 '16 at 0:10
HaruHaru
11617
11617
add a comment |
add a comment |
I posted a more detailed answer at AskDifferent.
Put in /etc/asl.conf
a rule like the following
? [= Sender foobar] [<= Level error] notify com.apple.foobar
op key value op key value
-----query 1----- -----query 2---- ---------action--------
In order to ignore messages in both system.log
and in Console.app
, you should add rules to ignore messages before the following comment in asl.conf
.
# Flat file configurations formerly in syslog.conf
Example with modifier S
, which ignores messages matching that substring from SIMBL Agent
.
? [= Sender SIMBL Agent] [S= Message warning: failed to get scripting definition from] ignore
op -key-- ---value--- mod --key-- --------------------value-----------------------
--------query 1------- -----------------------query 2------------------------------- action
After adding a rule restart the daemon with sudo killall HUP syslogd
.
Tested successfully in OS X 10.8.5.
add a comment |
I posted a more detailed answer at AskDifferent.
Put in /etc/asl.conf
a rule like the following
? [= Sender foobar] [<= Level error] notify com.apple.foobar
op key value op key value
-----query 1----- -----query 2---- ---------action--------
In order to ignore messages in both system.log
and in Console.app
, you should add rules to ignore messages before the following comment in asl.conf
.
# Flat file configurations formerly in syslog.conf
Example with modifier S
, which ignores messages matching that substring from SIMBL Agent
.
? [= Sender SIMBL Agent] [S= Message warning: failed to get scripting definition from] ignore
op -key-- ---value--- mod --key-- --------------------value-----------------------
--------query 1------- -----------------------query 2------------------------------- action
After adding a rule restart the daemon with sudo killall HUP syslogd
.
Tested successfully in OS X 10.8.5.
add a comment |
I posted a more detailed answer at AskDifferent.
Put in /etc/asl.conf
a rule like the following
? [= Sender foobar] [<= Level error] notify com.apple.foobar
op key value op key value
-----query 1----- -----query 2---- ---------action--------
In order to ignore messages in both system.log
and in Console.app
, you should add rules to ignore messages before the following comment in asl.conf
.
# Flat file configurations formerly in syslog.conf
Example with modifier S
, which ignores messages matching that substring from SIMBL Agent
.
? [= Sender SIMBL Agent] [S= Message warning: failed to get scripting definition from] ignore
op -key-- ---value--- mod --key-- --------------------value-----------------------
--------query 1------- -----------------------query 2------------------------------- action
After adding a rule restart the daemon with sudo killall HUP syslogd
.
Tested successfully in OS X 10.8.5.
I posted a more detailed answer at AskDifferent.
Put in /etc/asl.conf
a rule like the following
? [= Sender foobar] [<= Level error] notify com.apple.foobar
op key value op key value
-----query 1----- -----query 2---- ---------action--------
In order to ignore messages in both system.log
and in Console.app
, you should add rules to ignore messages before the following comment in asl.conf
.
# Flat file configurations formerly in syslog.conf
Example with modifier S
, which ignores messages matching that substring from SIMBL Agent
.
? [= Sender SIMBL Agent] [S= Message warning: failed to get scripting definition from] ignore
op -key-- ---value--- mod --key-- --------------------value-----------------------
--------query 1------- -----------------------query 2------------------------------- action
After adding a rule restart the daemon with sudo killall HUP syslogd
.
Tested successfully in OS X 10.8.5.
edited Apr 13 '17 at 12:45
Community♦
1
1
answered Feb 13 '17 at 14:36
1.618031.61803
24328
24328
add a comment |
add a comment |
I am on MacOS Mojave (10.14.3) and this post was helpful to me so I want to clarify what worked for me as I have not seen it all together in a single place. In my case I wanted to filter out Microsoft OneNote messages which were constantly spamming my system.log file at a rate of 5 a second. Sample message:
Feb 3 22:52:49 MyMacMini-2 Microsoft OneNote[393]: [ACT]:[TASKSCHEDULER]:[Info]:opQueue=0x6000012d7760 after call to waitUntilAllOperationsAreFinished
So I edited /etc/asl.conf with the following rule:
# Disable Microsoft OneNote logging as is filling up system.log!
? [= Sender Microsoft OneNote] ignore
You need to add this before the line that says:
# Rules for /var/log/system.log
As otherwise it will not work. Then just restart syslogd with this command and the messages should be gone from system.log:
sudo killall -HUP syslogd
add a comment |
I am on MacOS Mojave (10.14.3) and this post was helpful to me so I want to clarify what worked for me as I have not seen it all together in a single place. In my case I wanted to filter out Microsoft OneNote messages which were constantly spamming my system.log file at a rate of 5 a second. Sample message:
Feb 3 22:52:49 MyMacMini-2 Microsoft OneNote[393]: [ACT]:[TASKSCHEDULER]:[Info]:opQueue=0x6000012d7760 after call to waitUntilAllOperationsAreFinished
So I edited /etc/asl.conf with the following rule:
# Disable Microsoft OneNote logging as is filling up system.log!
? [= Sender Microsoft OneNote] ignore
You need to add this before the line that says:
# Rules for /var/log/system.log
As otherwise it will not work. Then just restart syslogd with this command and the messages should be gone from system.log:
sudo killall -HUP syslogd
add a comment |
I am on MacOS Mojave (10.14.3) and this post was helpful to me so I want to clarify what worked for me as I have not seen it all together in a single place. In my case I wanted to filter out Microsoft OneNote messages which were constantly spamming my system.log file at a rate of 5 a second. Sample message:
Feb 3 22:52:49 MyMacMini-2 Microsoft OneNote[393]: [ACT]:[TASKSCHEDULER]:[Info]:opQueue=0x6000012d7760 after call to waitUntilAllOperationsAreFinished
So I edited /etc/asl.conf with the following rule:
# Disable Microsoft OneNote logging as is filling up system.log!
? [= Sender Microsoft OneNote] ignore
You need to add this before the line that says:
# Rules for /var/log/system.log
As otherwise it will not work. Then just restart syslogd with this command and the messages should be gone from system.log:
sudo killall -HUP syslogd
I am on MacOS Mojave (10.14.3) and this post was helpful to me so I want to clarify what worked for me as I have not seen it all together in a single place. In my case I wanted to filter out Microsoft OneNote messages which were constantly spamming my system.log file at a rate of 5 a second. Sample message:
Feb 3 22:52:49 MyMacMini-2 Microsoft OneNote[393]: [ACT]:[TASKSCHEDULER]:[Info]:opQueue=0x6000012d7760 after call to waitUntilAllOperationsAreFinished
So I edited /etc/asl.conf with the following rule:
# Disable Microsoft OneNote logging as is filling up system.log!
? [= Sender Microsoft OneNote] ignore
You need to add this before the line that says:
# Rules for /var/log/system.log
As otherwise it will not work. Then just restart syslogd with this command and the messages should be gone from system.log:
sudo killall -HUP syslogd
answered Feb 3 at 23:36
TurribeachTurribeach
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f278231%2fhow-to-disable-set-logging-level-preferences-per-mac-os-x-application%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Consider accepting answers to your questions if they solve the issue by clicking the checkmark next to them, or alternatively edit your questions or comment on answers why they don't work for you.
– Daniel Beck♦
Jun 5 '11 at 16:43