Log files
-
Hi!
Is it possible to generate two additional log files, the first being the replica of what is displayed on screen by the Rule History widgets and the other with Recently Changed Entities?
And could I configure the generation of one file per day, and delete the older ones? For example, store the last 5 days?
And being more ambitious, does Windget have an icon to open these TXT files in the navigated?
Well, we're approaching Christmas, so here's my request to Santa Claus @toggledbits
-
Hi!
Is it possible to generate two additional log files, the first being the replica of what is displayed on screen by the Rule History widgets and the other with Recently Changed Entities?
And could I configure the generation of one file per day, and delete the older ones? For example, store the last 5 days?
And being more ambitious, does Windget have an icon to open these TXT files in the navigated?
Well, we're approaching Christmas, so here's my request to Santa Claus @toggledbits
@wmarcolin said in Log files:
Is it possible to generate two additional log files, the first being the replica of what is displayed on screen by the Rule History widgets and the other with Recently Changed Entities?
And could I configure the generation of one file per day, and delete the older ones? For example, store the last 5 days?
We can get pretty close. There should already be a placeholder
Rule
entry in yourconfig/logging.yaml
file. Make it look like this:Rule: level: 4 streams: - type: file name: rules.log recycle: true keep: 4 maxsize: 2
This tells Reactor to log messages of
INFO
and higher to a file calledrules.log
(in thelogs
subdirectory). Therecycle
key tells the logger to start a new file on each Reactor restart. Thekeep: 4
tells the logger to keep the last 4 files. Themaxsize: 2
limits the size of a single log file to 2MB.What this doesn't do is rotate the log daily. I will address that in an upcoming version.
@wmarcolin said in Log files:
And being more ambitious, does Windget have an icon to open these TXT files in the navigated?
Note sure what you mean here. If you're talking about the log files, they are just plain text, so you can open them in NotePad or any similar tool that capable of reading/editing text files (i use NotePad++).
-
@wmarcolin said in Log files:
Is it possible to generate two additional log files, the first being the replica of what is displayed on screen by the Rule History widgets and the other with Recently Changed Entities?
And could I configure the generation of one file per day, and delete the older ones? For example, store the last 5 days?
We can get pretty close. There should already be a placeholder
Rule
entry in yourconfig/logging.yaml
file. Make it look like this:Rule: level: 4 streams: - type: file name: rules.log recycle: true keep: 4 maxsize: 2
This tells Reactor to log messages of
INFO
and higher to a file calledrules.log
(in thelogs
subdirectory). Therecycle
key tells the logger to start a new file on each Reactor restart. Thekeep: 4
tells the logger to keep the last 4 files. Themaxsize: 2
limits the size of a single log file to 2MB.What this doesn't do is rotate the log daily. I will address that in an upcoming version.
@wmarcolin said in Log files:
And being more ambitious, does Windget have an icon to open these TXT files in the navigated?
Note sure what you mean here. If you're talking about the log files, they are just plain text, so you can open them in NotePad or any similar tool that capable of reading/editing text files (i use NotePad++).
As always, you are very quick and attentive; thank you.
The point I mentioned about Windget having an icon to open plain text would be to show the log file in a browser. To see this file today, I have to use PuTTY, log in to my VM, search for the directory, and then open the file with Nano.
I wanted a faster way to view the file in a browser without having to install Apache or a Python SimpleHTTPServer.
Thanks.
-
As always, you are very quick and attentive; thank you.
The point I mentioned about Windget having an icon to open plain text would be to show the log file in a browser. To see this file today, I have to use PuTTY, log in to my VM, search for the directory, and then open the file with Nano.
I wanted a faster way to view the file in a browser without having to install Apache or a Python SimpleHTTPServer.
Thanks.
@wmarcolin said in Log files:
I wanted a faster way to view the file in a browser without having to install Apache or a Python SimpleHTTPServer.
OK. I get that.
-
@wmarcolin said in Log files:
I wanted a faster way to view the file in a browser without having to install Apache or a Python SimpleHTTPServer.
OK. I get that.
Instead of an icon in the widget, you could use the MSR Tools group to access these log files.
Thanks
-
I'm going to do something quick and dirty first, because my long-term idea for this is too much to do in the current build, which has already accumulated a lot of changes and needs to get out. I've also been alternately on standby and working on disaster relief since hurricane Helene was in Mexico, and continuing with Milton gaining strength.
-
I'm going to do something quick and dirty first, because my long-term idea for this is too much to do in the current build, which has already accumulated a lot of changes and needs to get out. I've also been alternately on standby and working on disaster relief since hurricane Helene was in Mexico, and continuing with Milton gaining strength.
Friend Santa Claus, please take care of yourself, I'm changing my Christmas request so that you and yours are safe and well! Don't worry about my request.
Thanks.
-
I'm going to do something quick and dirty first, because my long-term idea for this is too much to do in the current build, which has already accumulated a lot of changes and needs to get out. I've also been alternately on standby and working on disaster relief since hurricane Helene was in Mexico, and continuing with Milton gaining strength.
@toggledbits godspeed Patrick!
-
T toggledbits unlocked this topic on
-
T toggledbits locked this topic on