On 2024-02-14 22:17, -pj via openSUSE Users wrote:
On 02-14-2024 06:56AM, Carlos E. R. wrote:
On 2024-02-14 07:45, -pj via openSUSE Users wrote:
On 02-13-2024 09:57PM, Carlos E. R. wrote:
On 2024-02-14 03:40, -pj via openSUSE Users wrote:
On 02-13-2024 04:49PM, Carlos E. R. wrote:
On 2024-02-13 23:34, -pj via openSUSE Users wrote: > On 02-13-2024 05:59AM, Carlos E. R. wrote: >> On 2024-02-13 00:13, -pj via openSUSE Users wrote:
...
Trick:
logger -t Mine -p local1.info "The script works."
(local "one")
When you speak of "(local "one")" I do not understand what you are referring to very well. Can you please explain this a bit more perhaps?
That the "1" in the name is a one, not a lower case "L". There are local1, local2,...local7. I don't remember if more. I can give you tomorrow the rest of the names (I have to find them). See the man page. I apologize for not seeing the clarity which you presented in "(local "one")" initially. I for some reason was thinking something else was possibly meant by this.
Ah, found them: The syslog (2) on this machine here contains the similar if not same to displayed below. I was completely oblivious to the connection of syslog and journalctl output before. I see now there is a sort of connection at least.
Journal is a redesign of syslog, but many admins prefer syslog. You can have both.
#CER docs, from syslog(2)
#define KERN_EMERG "<0>" /* system is unusable */ Is this what you are refering to by "local1" (below)?
Below. It took me some time, long ago, to find the exact definitions. See *88* below. Ok I see.
#define KERN_ALERT "<1>" /* action must be taken immediately */
...
#/* other codes through 15 reserved for system use */ reserved for local use #define LOG_LOCAL0 (16<<3) /* reserved for local use */ #define LOG_LOCAL1 (17<<3) /* reserved for local use */
This one. I see, I was not looking closely enough again.
Notice that what is important is the names. That there are "syslog facilities" named "local0, local1, ..., local7. And others. I did not find a man page listing the exact names of all the facilities and priorities, what I found were the source definition names, which are similar but not exactly the same. So the source has "KERN_ALERT", but the actual name you can use is "alert". ...
You disabled the log entry by using "echo" in the line.
Yes, I have corrected that "echo" mistake now, please see above. I have also altered the journalctl syntax being used to the following: journalctl -b -1 | grep "PS2\|Keyboard" now. Is this similar to what you would recommend?>
Yes. Possibly you can also search for this one faster: -t, --identifier=SYSLOG_IDENTIFIER Show messages for the specified syslog identifier SYSLOG_IDENTIFIER. This parameter can be specified multiple times. Which I /think/ corresponds to the -t in logger: logger -t PS2-Keyboard.sh -p local1.info "Disabling wakeup in PS2 keyboard" -t, --tag tag Mark every line to be logged with the specified tag. The default tag is the name of the user logged in on the terminal (or a user name based on effective user ID). ... -- Cheers / Saludos, Carlos E. R. (from 15.5 x86_64 at Telcontar)