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 » Extended Logging Package
icon6.gif  Extended Logging Package [message #17275] Tue, 05 August 2008 14:31 Go to previous message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
I created a package to extend the logging capabilities of Upp. I encountered a situation where I wanted to use custom log files for release programs to log Successful and Failed transfers. It is built as a singleton with lazy creation. I built it with an archiving capability so it uses Upp bz2 package to archive logs older than a user-defined time frame. There are special cases for debug and release logs so that the archiving and dating capabilities can also apply to them. Finally, there is some Topic++ documentation for it, but the in-code documentation in the header file is best. Let me know what you think.

Simple Example:
void QuickExample(){
	// Logger singleton instance created automatically and lazily on first use.	
	UppLog::LOGGER->BeginLogs();
        UppLog::LOGGER->EnableCout(UppLog::RELEASE);
	UppLog::UPPLOG(UppLog::BOTH, "This message is sent to both log files.");
	UppLog::UPPLOG(UppLog::DEBUG, "This message is sent to debug log.");
	UppLog::UPPLOG(UppLog::RELEASE, "This message is sent to release log (and Cout()).");
	
	UppLog::LOGGER->CreateLog("Successes");
	UppLog::LOGGER->CreateLog("Failures", "C:\\failures");
	UppLog::UPPLOG("Successes", "My successful transaction message.");
	UppLog::UPPLOG("Failures", "My failed transaction message.");	
};


Edit: Attachment deleted. Use the newer version below.

[Updated on: Tue, 23 September 2008 19:16]

Report message to a moderator

 
Read Message icon6.gif
Read Message
Read Message
Read Message
Previous Topic: Shiny: C++ profiler - Ultimate++ package
Next Topic: Shared object with auto locking strategy
Goto Forum:
  


Current Time: Mon Apr 29 11:52:36 CEST 2024

Total time taken to generate the page: 0.02922 seconds