Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » SystemLog class added
Re: SystemLog class added [message #15913 is a reply to message #15911] Thu, 15 May 2008 18:31 Go to previous message
mdelfede is currently offline  mdelfede
Messages: 1310
Registered: September 2007
Ultimate Contributor
mrjt wrote on Thu, 15 May 2008 17:06

I've started using this, it's very handy.


thx Smile

Quote:


It didn't compile on Win32 though, so I've fixed it and committed the fixes to the SVN (hope you don't mind). No changes that will effect the POSIX code path.


no problems, it's on bazaar to be used/corrected Smile
I didn't test on windows, 'cause I mainly work on Linux.

Quote:


The only slightly dodgy one is that ERROR seems to be defined somewhere in the Windows include files and I've fixed this using a conditional #undef. Renaming the enum would be better but I didn't want the change the interface.


we could also rename the enum... I put it in an "in-class" enum to avoid name clashes with other code, but there's no limit on Microsoft bad coding style Smile
We could also change all enum's names with just uppercase first letter.... That could solve name clashes. Feel free to change this, I'm just using it for a short time, so it's no problem to change the interface.... better now than later.

BTW, my class does have a small problem that I'd like to solve.
Using unix system log (and I guess windows too...) on each log write a newline is appended, making less useful the << operator :
SysLog(ERROR) << "a message" << "another message"

will put the messages on 2 different lines.... so I added an automatic "\n" to console output and upp log one to have a consistent behaviour.
I'd prefere to allow more logs on the same line, but to overcome the linux log limit the only solution would be line buffering... Maybe I'll try to implement such a stuff.

Ciao

Max

[Updated on: Thu, 15 May 2008 18:34]

Report message to a moderator

 
Read Message
Read Message
Read Message
Previous Topic: Modified SliderCtrl
Next Topic: DialSlider (curved slider ctrl)
Goto Forum:
  


Current Time: Fri Aug 29 12:04:48 CEST 2025

Total time taken to generate the page: 0.05851 seconds