logo logo
Home arrow Robotics Studio... arrow Robotics Studio Services arrow ConcurrentLogger for .NET
Saturday, 11 February 2012
 
 
Main Menu
Home
Conscious Machines...
AI Techniques...
Neuroscience...
Researchers...
Publications...
Reviews...
MC Bibliography
Robotics Studio...
Forums...
Blog...
Frontpage
Upcoming Events
22.Feb. 2012

CogSys 2012
Vienna, Austria
04.Apr. 2012

TSC 2012
Tucson, Arizona
17.May. 2012

EAIS 2012
Madrid, Spain
05.Jun. 2012

Cognition & Consciousness
Menorca. Spain
02.Jul. 2012

ASSC 16
Brighton, UK
02.Jul. 2012

Revisiting Turing and his Test
Birmingham, UK
31.Oct. 2012

BICA 2012
Palermo. Italy
Tag Cloud
Associations Books Conferences Conscious Conscious Machines Consciousness Developer Documentación Documentation Español Machine Machine Consciousness Machines Neuroscience Positions Publications Research Researchers Reviews Robotics Robots Spanish Studio VPL
Spotlight
More
Reader's Preferred
MCexperts List
FAQs
Glossary
Site Map
ConcurrentLogger for .NET Print E-mail
Written by Raúl Arrabales Moreno   
Friday, 25 May 2007

Image ConcurrentLogger is a quite simple .NET class that allows you to write a unique and sequential log file from a multi-thread application. I am programming robotics applications using MSRS, and I wanted to generate an independent log file that could be safely created from a multithreaded and asynchronous application.

I looked for other .NET components or libraries for logging, like log4net, CSharp Logger, Logger.Net, etc. However, I couldn't find a simple library able to manage complete asynchronous use. Then, I decided to use the CCR library to write a really simple logger component that allows me to just define a log level and call a simple method to write a log line everytime a need it.

This is an example of use in C# (C Sharp):

[...]
ConcurrentLogger logger = new ConcurrentLogger( "MyLogFile.txt"LogLevel.DEBUG );
[...]
logger.writeLog( "MyComponent", LogLevel.INFO"This is a test INFO message" );
[...]

 

Predefined log levels (defined in LogLevel static class) are:

DEBUG: trace everything.
- INFO: aka verbose. Everything is logged.
- WARN: medium level of log. All messages defined as error, warn and fatal are logged.
- ERROR: log all messages except those defined as debug.
- FATAL: the lower level of log, only fatal messages are logger.

As this class makes use of the CCR library you need to include a reference to the CCR in your Visual Studio project. The CCR library is freely available and distributed within Microsoft Robotics Studio SDK. Using the CCR, ConcurrentLogger assures that all calls that cause to write a log line in the log file are executed in the very single thread even though the calls are generated concurrently and asynchronously from different threads. The call to writeLog is always non-blocking. Log messages are enqueued and dispatched in a exclusive fashion (single thread).

 More documentation about this component:

 

 

 


Add as favourites (212) | Quote this article on your site | Views: 20315

  Be first to comment this article
RSS comments

Only registered users can write comments.
Please login or register.


Related Items:

  1. ConcurrentLogger Beta 1 Source Code
  2. Jobs: Two Chair positions for new Centre for Computational Neuroscience and Co
  3. Birmingham Fellows in Robotics and Cognitive Systems
  4. Finding papers about consciousness and robotics
  5. Paladyn. Journal of Behavioral Robotics
  6. International Journal of Social Robotics
  7. Cognitive Robotics and Machine Consciousness
  8. The Puzzle of the Brain: Conciousness
  9. Cognitive Robotics
  10. Global Workspace Theory (GWT)
Last Updated ( Wednesday, 01 August 2007 )
 





Lost Password?
No account yet? Register
 Conscious Robots RSS FeedConscious Robots RSS Feed

Find us on Facebook

Follow us on TwitterFollow us on twitter
Spotlight

Machine Consciousness Bibliography Database

 

ConsScale
The Cognitive Machine Consciousness Scale

 
Categories
Last Posts in Forum
 
CR
miel continental