diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2009-03-19 10:16:27 +0100 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2009-03-19 10:16:27 +0100 |
commit | 59218203a248a958ad5cb281507dbd7ad3255334 (patch) | |
tree | 1d609468dc07f5d36d58b107bb9fb5e8724cbd35 /tests/log | |
parent | 00b4325ff33c93d3a1c0039a07184e352df34354 (diff) | |
download | wolfbones-59218203a248a958ad5cb281507dbd7ad3255334.tar.gz wolfbones-59218203a248a958ad5cb281507dbd7ad3255334.tar.bz2 |
more cleanup, making a local testmsg.dll for testing the logger on windows
Diffstat (limited to 'tests/log')
-rw-r--r-- | tests/log/Makefile.W32 | 15 | ||||
-rw-r--r-- | tests/log/testmsg.mc | 64 |
2 files changed, 78 insertions, 1 deletions
diff --git a/tests/log/Makefile.W32 b/tests/log/Makefile.W32 index 324d34f..0a1b688 100644 --- a/tests/log/Makefile.W32 +++ b/tests/log/Makefile.W32 @@ -4,6 +4,7 @@ SUBDIRS = INCLUDE_DIRS = \ /I$(TOPDIR)\include\wolf /I. + /D_WIN32_WINNT=0x400 /I"$(PLATFORM_SDK_DIR)\Include" INCLUDE_LDFLAGS = \ /LIBPATH:"$(PLATFORM_SDK_DIR)\lib" @@ -12,6 +13,9 @@ INCLUDE_LIBS = \ $(TOPDIR)\src\wolf.lib \ advapi32.lib +LIBRARIES = \ + log\testmsg.dll + TEST_BINS = \ test_log.exe @@ -19,7 +23,13 @@ TEST_BINS = \ test_log.exe: test_log.obj $(TOPDIR)\src\wolf.lib -local_test: +log\testmsg.dll: log\testmsg.res + $(LINK) /dll /nologo /noentry /MACHINE:x86 /out:$@ $? + +log\testmsg.rc: log\testmsg.mc +log\testmsg.res: log\testmsg.rc + +local_test: $(LIBRARIES) @echo Testing log.. @test_log 2>NUL @@ -27,5 +37,8 @@ local_all: local_clean: @-erase test.log 2>NUL + @-erase $(LIBRARIES) log\testmsg.h 2>NUL local_distclean: + + diff --git a/tests/log/testmsg.mc b/tests/log/testmsg.mc new file mode 100644 index 0000000..3aad1ab --- /dev/null +++ b/tests/log/testmsg.mc @@ -0,0 +1,64 @@ +;// messages file for wolf messages + +;// language codes for translated messages +;// (409 ist the windows locale for en-US) +LanguageNames = ( + English = 0x409 : MSG00409 +) + +;// Category names come first, the 'CategoryCount' registry entry +;// for the event source must match the number of entries here. +;// Also the numbering must be strictly starting by one and increase +;// by one. Careful: categories MUST be defined here, the message +;// compiler is a little bit flag and context infected. Also make +;// sure they are not longer than 10 characters, the event viewer +;// field is quite small. + +MessageId = 0x1 +SymbolicName = WOLF_CATEGORY_1 +Language = English +Category 1 +. + +MessageId = 0x2 +SymbolicName = WOLF_CATEGORY_2 +Language = English +Category 2 +. + +;// event log severity levels (severity bits) +SeverityNames = ( + Success = 0x0 : STATUS_SEVERITY_SUCCESS + Informational = 0x1 : STATUS_SEVERITY_INFORMATIONAL + Warning = 0x2 : STATUS_SEVERITY_WARNING + Error = 0x3 : STATUS_SEVERITY_ERROR +) + +;// facility names +FacilityNames = ( + System = 0x0FF + Application = 0xFFF +) + + + +;// event messages from here + +MessageIdTypedef = DWORD + +MessageId = 0x100 +Severity = Error +Facility = Application +SymbolicName = WOLF_TEST_NO_PARAMS +Language = English +This is a test message without any parameters +It can be two lines though +. + +MessageId = 0x101 +Severity = Error +Facility = Application +SymbolicName = WOLF_TEST_PARAMS +Language = English +This is a message with parameter %1 and parameter %2 +. |