@@ -8,34 +8,47 @@ by LunaX - 2010/2011
8
8
9
9
!CURRENT VERSION
10
10
11
- 0.8)14 -FEB-2012 beta version.
11
+ 1.0)24 -FEB-2012 beta version.
12
12
13
13
!HISTORY
14
14
15
- 0.8) 14 -FEB-2012 Initial Release\\
15
+ 1.0) 24 -FEB-2012 Initial Release\\
16
16
17
17
18
18
!DESCRIPTION
19
19
Easy to use logging library, like log4j or log4net. After getting a logger object, you will have
20
20
methods like Error, Info, Warn, Debug, Verbose to log informations over RS232.
21
21
Depending on the current loglevel lower logleves are not printed out.
22
22
It is possible to work with variable argument lists during output.
23
+ Detailed description is included in doc folder
23
24
24
25
!HOW TO IMPORT/INSTALL
25
- Download here: [[Attach:Enerlib.zip|Enerlib 1.0.0 ]]
26
+ Download here zip file here [[https://github.com/mrRobot62/Arduino-logging-library ]]
26
27
27
28
Put the Logging folder in "libraries\".
28
29
29
- In the Arduino IDE, create a new sketch (or open one) and select from the menubar "Sketch->Import Library->Logging".
30
- Once the library is imported, a "#include <Logging.h>" line will appear at the top of your Sketch.
31
-
32
- !Methods
33
- !!void Error(
34
-
35
- !Loglevels
36
-
37
- !Example
38
- For more examples look into sub folder examples
39
-
40
-
41
- @]%%
30
+ Open example project which is included in the zip file. Try it, like it :-)
31
+
32
+ Some benefits:
33
+ !Use formated strings with wildcards
34
+ ||border=0
35
+ ||!wildcard ||!Comment ||Example ||
36
+ ||%s ||replace with an string (char*) ||logger.Info("String %s",myString); ||
37
+ ||%c ||replace with an character ||logger.Info("use %c as input",myChar); ||
38
+ ||%d ||replace with an integer value ||logger.Info("current value %d",myValue); ||
39
+ ||%l ||replace with an long value ||logger.Info("current long %l",myLong); ||
40
+ ||%x ||replace and convert integer value into hex ||logger.Info ("as hex %x), myValue); ||
41
+ ||%X ||like %x but combine with 0x123AB ||logger.Info ("as hex %X), myValue); ||
42
+ ||%b ||replace and convert integer value into binary ||logger.Info ("as bin %b), myValue); ||
43
+ ||%B ||like %x but combine with 0b10100011 ||logger.Info ("as bin %B), myValue); ||
44
+ ||%t ||replace and convert boolean value into "t" or "f" ||logger.Info ("is it true? %t), myBool); ||
45
+ ||%T ||like %t but convert into "true" or "false" ||logger.Info ("is it true? %T), myBool); ||
46
+
47
+ !Methods for output
48
+ ||border=0
49
+ ||!Methode ||!Comment ||
50
+ ||Error ||print messages with loglevel >= LOGLEVEL_ERROR ||
51
+ ||Info ||print messages with loglevel >= LOGLEVEL_INFO ||
52
+ ||Debug ||print messages with loglevel >= LOGLEVEL_DEBUG ||
53
+ ||Verbose ||print messages with loglevel >= LOGLEVEL_VERGBOSE ||
54
+ %%
0 commit comments