01-03-2019 07:36 AM - edited 03-05-2019 11:09 AM
Hi
I have noticed that every time I change the logging buffered amount on a device the log is cleared.
Is there any way to change the buffer without clearing the log?
Router useing Version 15.4(3)M1
Solved! Go to Solution.
01-03-2019 08:09 AM
The original post asked about a behavior when the size of the logging buffer is changed. As far as I know there is not any way to change that behavior. When you change the size of the logging buffer then the existing buffer content will be cleared. If you want a way to preserve that content then you would need to copy the content of the current log buffer before changing it.
HTH
Rick
01-03-2019 07:45 AM - edited 01-03-2019 07:49 AM
Hi there,
Logging to the internal buffer is FIFO and therefore transient. Don’t rely on the contents always being there. If you want to preserve them, either save the buffer to flash:
logging file flash:
…or send the output to a syslog server for archive purposes.
However neither of these solutions will store the messages already in the buffer at the point in time they are set up.
Cheers,
Seb.
01-03-2019 07:49 AM
01-03-2019 08:08 AM
Apologies, after looking at the command references, logging to file seems to be only available in IOS-XE.
01-03-2019 08:09 AM
The original post asked about a behavior when the size of the logging buffer is changed. As far as I know there is not any way to change that behavior. When you change the size of the logging buffer then the existing buffer content will be cleared. If you want a way to preserve that content then you would need to copy the content of the current log buffer before changing it.
HTH
Rick
01-03-2019 08:22 AM
Hello
Just like to add to ricks comments regards saving the logging output before changing its size.
One near way to save it would to use the show and Tee commands together
show logging | tee loggingfile.txt
This will save the output of the show logging to a file on the flash of the device which from there you could transfer if off at your leasure
01-03-2019 09:02 AM
I am glad that our responses have been helpful. Thank you for marking this question as solved. This will help other participants in the community to recognize discussions which have helpful information. I believe that the information in this discussion will be helpful to some other participants.
HTH
Rick
01-04-2019 06:43 AM
01-04-2019 07:02 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide