This forum has been archived. All content is frozen. Please use KDE Discuss instead.

notifications shown while log rotation is performed

Tags: None
(comma "," separated)
MoDaX
Registered Member
Posts
241
Karma
0
OS
KTorrent "rotates" (moves) log files each time on startup. While notification (progress) dialog is usually not shown (because the process is SO fast) on KDE 4.1, KDE 4.2 has a rewritten notification system and those notifications (many of them) are shown (by design). Since it does not make much sense to display those notifications while rotating logs, please disable them in the KTorrent code.
George
Moderator
Posts
5421
Karma
1

Mon Dec 01, 2008 2:58 pm
All those jobs have the KIO::HideProgressInfo flag set, so they shouldn't be shown.
MoDaX
Registered Member
Posts
241
Karma
0
OS

Mon Dec 01, 2008 6:06 pm
George wrote:All those jobs have the KIO::HideProgressInfo flag set, so they shouldn't be shown.

Apparently, that's not enough. Issue is the case in KDE 4.1 too, just progress dialog appears & disappears very quickly.
George
Moderator
Posts
5421
Karma
1

Tue Dec 02, 2008 7:14 am
MoDaX wrote:
George wrote:All those jobs have the KIO::HideProgressInfo flag set, so they shouldn't be shown.

Apparently, that's not enough. Issue is the case in KDE 4.1 too, just progress dialog appears & disappears very quickly.


I will investigate, but this is probably a KDE bug.
George
Moderator
Posts
5421
Karma
1

Tue Dec 02, 2008 1:08 pm
This is fixed now, it turns out we weren't passing the flag in the first log rotate at start up
MoDaX
Registered Member
Posts
241
Karma
0
OS

Tue Dec 02, 2008 3:55 pm
George wrote:This is fixed now, it turns out we weren't passing the flag in the first log rotate at start up

Thank you, it is fixed.
MoDaX
Registered Member
Posts
241
Karma
0
OS

Sat Dec 06, 2008 6:39 pm
MoDaX wrote:Thank you, it is fixed.

The fix was incomplete. I know patches from forum do not apply but you should get the idea:
Code: Select all
--- libbtcore/util/log.cpp      (revision 893436)
+++ libbtcore/util/log.cpp      (working copy)
@@ -100,7 +100,9 @@
                        }

                        // move current log to 1 and zip it
-                       bt::Move(file,file + "-1",true);
+                       KIO::CopyJob *mv = KIO::move(KUrl(file),KUrl(file + "-1"), KIO::HideProgressInfo|KIO::Overwrite);
+                       mv->exec();
+                       delete mv;
                        CompressFileJob* gzip = new CompressFileJob(file + "-1");
                        gzip->exec();
                        delete gzip;
renrutal
Registered Member
Posts
10
Karma
0

Sat Dec 06, 2008 7:05 pm
How do you disable the logging?

And why does it move log n to log n+1, for every log? It could just write the latest one to n+1, or some log-date{yyyyMMddHHmmss}.gz format, that way it could decrease the complexity and resources used.
George
Moderator
Posts
5421
Karma
1

Sun Dec 07, 2008 9:39 am
MoDaX wrote:
MoDaX wrote:Thank you, it is fixed.

The fix was incomplete. I know patches from forum do not apply but you should get the idea:
Code: Select all
--- libbtcore/util/log.cpp      (revision 893436)
+++ libbtcore/util/log.cpp      (working copy)
@@ -100,7 +100,9 @@
                        }

                        // move current log to 1 and zip it
-                       bt::Move(file,file + "-1",true);
+                       KIO::CopyJob *mv = KIO::move(KUrl(file),KUrl(file + "-1"), KIO::HideProgressInfo|KIO::Overwrite);
+                       mv->exec();
+                       delete mv;
                        CompressFileJob* gzip = new CompressFileJob(file + "-1");
                        gzip->exec();
                        delete gzip;


You are right, forgot that one.
George
Moderator
Posts
5421
Karma
1

Sun Dec 07, 2008 9:41 am
renrutal wrote:How do you disable the logging?


You can't

And why does it move log n to log n+1, for every log? It could just write the latest one to n+1, or some log-date{yyyyMMddHHmmss}.gz format, that way it could decrease the complexity and resources used.


Why not, moving a file on the same partition, shouldn't involve any copying of data.
ssmaxss
Registered Member
Posts
4
Karma
0

Mon Dec 22, 2008 6:05 pm
Same problem here. + I think it should be an option to disable logging and/or provide maximum number of log files ( so that logN is deleted at every logrotate).
okias
Registered Member
Posts
9
Karma
0

Disable logging

Tue Jan 06, 2009 6:11 pm
Hi, it's little out-topic, but can be added checkbox for disabling loging? I don't need logs and "probably" I'm not alone :-)

Thanks
ssmaxss
Registered Member
Posts
4
Karma
0

Tue Jan 06, 2009 6:14 pm
My final solution is adding
Code: Select all
rm -f .kde4.2/share/apps/ktorrent/log*

to ~/.bashrc
I think this "feature" is blocker bug for 3.2
MoDaX
Registered Member
Posts
241
Karma
0
OS

Tue Jan 06, 2009 6:19 pm
ssmaxss wrote:I think this "feature" is blocker bug for 3.2

Come on, don't be ridiculous
ssmaxss
Registered Member
Posts
4
Karma
0

Tue Jan 06, 2009 6:24 pm
It populate whole desktop with tons of useless notifications? How would you call it?


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]