Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to control size of wayland-session.log with metalog?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
papu
l33t
l33t


Joined: 25 Jan 2008
Posts: 728
Location: Sota algun pi o alzina...

PostPosted: Mon Jul 29, 2024 6:04 pm    Post subject: how to control size of wayland-session.log with metalog? Reply with quote

hi,

I discover the existence of /home/user/.local/share/sddm/wayland-session.log with a size of 1.6G!!
I not have idea how to control( auto rotation) and what proces has creaded it

a metalog user I am, I think this wayland file needs logrotate to be detected but don't know if metalog are capable to rotate that file too

so, logrotate would interferes with the metalog rotate, wouldn't it?

mmm
_________________
--so ~amd64 & openrc --cpu 7700 non-x --ram 2x16GB --gpu RX 470


Last edited by papu on Wed Jul 31, 2024 9:18 am; edited 1 time in total
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2110

PostPosted: Tue Jul 30, 2024 7:43 am    Post subject: Reply with quote

papu wrote:
I discover the existence of /home/user/.local/share/sddm/wayland-session.log with a size of 1.5G!!
I not have idea how to control( auto rotation) and what proces has creaded it
...

It's created, in a trivial way, by the sddm script used to start wayland sessions (and there's a similar log for x11 sessions if you use them).
I don't remember the details, but AFAIR it's somewhere in /usr/share/sddm, and it's a bash script that redirects the wayland process's stdout and stderr to append the log file.
When I found the same issue of a humungous and useless log, I tweaked the script to rename the current log as "wayland-session.log.old". That way I had both old and current logs, but no deep history - but as I'd never ever looked at it, that seemed sensible!
_________________
Greybeard
Back to top
View user's profile Send private message
papu
l33t
l33t


Joined: 25 Jan 2008
Posts: 728
Location: Sota algun pi o alzina...

PostPosted: Tue Jul 30, 2024 1:33 pm    Post subject: Reply with quote

yeah!

but I want to logrotate it i don't know how to do , seems metalog not detects that file.

I have wrote inside /etc/logrotate.d/ ( that I assume is controled by metalog) something like that but wayland.session.log is not affected by it
Code:
/home/user/.local/share/sddm/wayland-session.log {
    daily
    missingok
    notifempty
    delaycompress
    compress
}


:cry: :cry:
_________________
--so ~amd64 & openrc --cpu 7700 non-x --ram 2x16GB --gpu RX 470
Back to top
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1618
Location: Germany

PostPosted: Tue Jul 30, 2024 2:01 pm    Post subject: Reply with quote

there is a Troubleshooting section available: https://wiki.gentoo.org/wiki/Metalog
Maybe it can help
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
papu
l33t
l33t


Joined: 25 Jan 2008
Posts: 728
Location: Sota algun pi o alzina...

PostPosted: Tue Jul 30, 2024 7:34 pm    Post subject: Reply with quote

Finally, I installed syslog-ng with logrotate and seems that file get stucked no more but I had to create a new rule.
Code:
# cat /etc/logrotate.d/wayland-session
/home/user/.local/share/sddm/*.log {
          daily
          size 1536k
          rotate 2
          missingok
          notifempty
          copytruncate
          compress
 }

and then logrotate -fv /etc/logrotate.conf

:)
_________________
--so ~amd64 & openrc --cpu 7700 non-x --ram 2x16GB --gpu RX 470
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum