Граф коммитов

30 Коммитов

Автор SHA1 Сообщение Дата
Dan Cristoloveanu dcdd8a9d88
Add provider guid cmake option (#210)
* Add a simple provider GUID cmake option

* Minor updates

* Add one comment

* Add a guard for the provider guid

* Add some cmake smarts to convert the GUID to what is needed in the code

* Minor fix

* Addressed one more CR comment

* Address last CR comment
2024-05-01 22:20:42 -07:00
Matt Durak dc0fa12c29
Make max log level for log_sink_callback configurable (#193) 2024-03-06 10:02:19 -08:00
Matt Durak f2c796fea2
Add log_sink_callback (#192)
* Add log_sink_callback with tests

* iwyu
2024-02-27 21:41:14 -08:00
Matt Durak 3eff06a909
Extract log_context_property_to_string from log_sink_console (#191)
* Extract log_context_property_to_string from log_sink_console for use with other log sinks that also want to convert all of the data to text
2024-02-26 22:10:31 -08:00
Dan Cristoloveanu a6e573cea7
Add back the check for printf format (which used to be there in v1, but lost in v2) (#158)
* Add back the check for printf format (which used to be there in v1, but lost in v2)

* Address CR comments

* Fix Linux build
2023-10-02 22:56:40 -07:00
Matt Durak ac31c6816f
Change console colors in v2 to make LOG_INFO less...yellow (#156) 2023-09-26 10:55:45 -07:00
anporumb 477a9de2d2
what does the gate say (#152) 2023-08-14 14:52:08 +00:00
Bingyi Yang da3d4fc6cb
add wchar string type (#146)
* add wchar string type

* fix include check err

* add wchar string type

* fix include err

* change to use vswprintf

* fix include err

* fix include err

* fix build err

* commit

* commit

* commit

* commit

* commit

* commit

* commit

* commit

* fix malloc err

* commit

* fix wchar int test

* fix log context ut

* debugging log sink sonsole int

* debugging log sink console int

* debugging log sink sonsole int

* fix log context ut

* fix wchar int test

* debugging log sink sonsole int

* fix log context ut

* commit

* fix malloc err

* commit

* commit

* fix linux build failure

* fix include check

* fix linux build failure

* addressing comments

* fix linux build err

* fix linux build err

* address comment

* addressing comments

* fix build err

* fix build failure
2023-07-13 22:36:07 -07:00
Dan Cristoloveanu fc77ca613f
Allow nested logger_init/deinit calls (#145) 2023-06-30 09:55:24 +05:30
Dan Cristoloveanu b2db9e648c
Add abort in case logger is not initialized (#144)
* Add abort in case logger is not initialized

* Fix IWYU

* Fix IWYU
2023-06-29 11:25:00 +05:30
Dan Cristoloveanu 7deb3732da
Add LOGGER_LOG_WITH_CONFIG (#142) 2023-06-26 08:53:07 -07:00
Dan Cristoloveanu fcbfb7cc21
Add set/get config and add v1 to v2 convenience macros (#141)
* logging_v2

* logging_v2

* logging_v2

* Split perf tests

* Split perf tests

* Add set/get config

* Fix failing tests

* Fix failing tests

* Fix failing tests

* Fix tests on Linux
2023-06-22 18:46:23 -07:00
Bingyi Yang 594c9b066b
add bool type handler (#136)
* add bool type handler

* fix build include check

* fix build include check

* fix build include check

* resolve comments

* fix build err

* fix build err

* fix build err

* fix build err

* resolve comments

* resolve comments

* run gate

* test

* test

* fix build error

* fix build error
2023-06-20 19:41:33 -07:00
Dan Cristoloveanu 7c3bc7d4e8
Add a warning suppress (#140)
* Add a warning suppress

* Address CR comments

* Minor mock fixes
2023-06-16 14:10:56 -07:00
Dan Cristoloveanu c5a07ff948
Add LOG_ERRNO (#138)
* Add specs

* Done with UTs

* Add log_errno_int

* Minor fixes

* Add string.h

* Split log_errno into win32 and linux

* Fix IWYU

* Fix IWYU

* Fix IWYU

* Fix Linux tests

* Fix IWYU again

* Fix IWYU again

* Address CR comments
2023-06-16 11:10:36 -07:00
Dan Cristoloveanu fa7c251de2
Add log_hresult (no SF) (#137)
* INitial log_hresult

* More

* Specs for log_hresult update

* Have specs for log_hresult

* More

* Extract FormatMessage wrapper

* First test pass for FormatMessageA_no_newline

* Added tests and code for FormatMessageA_no_newline

* Added one more test

* Added int test for FormatMessageA_no_newline

* Fixed log_lasterror unit tests

* Fixed spec IDs for log_lasterror

* Minor fix in log_lasterror int tests

* Fix some unit tests

* Tests pass

* Add int tests for log_hresult

* Add perf test for HRESULT

* Make Linux build pass

* Fix UT warning

* Added one test printing all error codes

* Address CR comments
2023-06-12 13:06:48 -07:00
Dan Cristoloveanu 69cc67da4e
Add LOG_LASTERROR property (#134)
* Add specs for log_lasterror

* Add last error property support

* Fix Linux build

* Fix IWYU

* Add perf test fo lasterror

* Make LOG_LASTERROR better

* Add log_lasterror ut and int tests

* Add UTs for context also

* Uncomment perf tests
2023-06-07 00:36:54 -07:00
Dan Cristoloveanu 0d36de50f4
Logger log ex implementation (#132)
* LOGGER_LOG_EX

* Add first test with LOGGER_LOG_EX

* Add one more test with LOGGER_LOG_EX

* Add one more test

* Add more tests

* More work

* Add LOGGER_LOG_EX

* Fix leaks

* Fix IWYU

* Addressed PR comments
2023-06-02 10:25:12 -07:00
Dan Cristoloveanu 87cd5936f7
Add logger unit (#128)
* Add first logger test

* Add specs

* First test passes

* Start using va_list

* Change interfaces to use va_list

* Make it build again

* Minor updates

* Fix Linux build

* Add unit tests checking that we actually make the log calls properly

* Make it build on Linux

* Fixc IWYU

* Add options so that we can control sinks independently

* Fix IWYU

* Fix IWYU

* Fix IWYU

* Fix typo
2023-05-26 18:39:08 -07:00
Dan Cristoloveanu f7c8a0b87f
Remove one Interlocked by having init/deinit (#126)
* Add specs for init/deinit

* Add some code

* log_sink_console passes

* Have init/deinit in log_sink_etw_ut

* Cleanup interlocked calls

* Make all UTs pass again

* Make deinit UTs pass

* Fix ut_2

* Fix int tests

* Fix one spec

* Add UT suite without init

* Update unit tests

* Make abort not display a popup

* Fix hang in int tests

* Address CR comments
2023-05-23 19:33:37 -07:00
Dan Cristoloveanu 5ea25948fa
Small rename (#125) 2023-05-22 17:04:05 -07:00
Dan Cristoloveanu 0e76e1be23
Log etw sink with tests (#123)
* 1

* 1

* Tested some more specs

* 1

* 1

* More work

* More work

* More work

* More tests

* More progress

* More progress

* Make one more test pass

* Last test only

* Add one more test

* More

* Add one more test

* Tests passing

* Fix spec IDs

* Check provider Id

* Remove some #pragmas

* One more test

* More tests

* Add more negative tests

* Cover all specs

* Remove the extra UT suite

* Add test with struct in struct

* Fix leaks

* Have one loop through the properties

* Fix tests

* Update deps

* Remove log sink etw int test from the PR

* Fix warning

* Compile log_sink_etw only on Wndowsi

* Fix CMakelists issue

* Fix x86 build

* Address some CR comments

* Address more CR comments

* More CR comments addressed

* More CR comments

* Address what can be addressed of the CR comments

* Update log_sink_etw_2 test
2023-05-15 16:50:07 -07:00
Dan Cristoloveanu 4aec9dcfe9
log_sink_etw specs (#119) 2023-03-29 22:23:54 -07:00
Dan Cristoloveanu 5b1b3c80dd
Add log sink console (#107)
* Add log_sink_console

* Start adding unit tests for log_sink_console

* Add more tests

* Add more tests

* Add more tests

* Add more tests

* Add more tests

* Fix specs

* Fix UT failing on gcc

* Fix spec IDs

* Fix IWYU

* Fix last IWYU thing in logger

* Address CR comments
2022-10-20 21:01:20 -07:00
Dan Cristoloveanu c6db002ca5
Add log_sink_console specs (#106)
* Add log_sink_console specs

* Address CR comments

* Make IWYU happy
2022-10-13 10:55:18 -07:00
Dan Cristoloveanu fdddc43129
Add log_context (#101)
* Add log_context

* Add needed specs and tests for log_context_property_type_if

* Fix warnings on Linux

* Fix warnings on Linux

* Fix warnings on Linux

* Fix Linux errors

* In the midst of testing

* Minor fixes

* First test with truncation

* Add bounds checks

* Add log_internal_error requirements

* Add log_internal_error_ut

* Add tests and code for log_internal_error_report

* Prepare for PR

* Fix Linux build

* Fix Linux build

* Add info about LOG_ABORT_ON_ERROR

* Add log_abort_on_error in CMakeLists for v2

* Remove some include

* Removed unused .c file

* Add MU include in log_context.c

* Removed includes from log_context.c

* Add an IWYU pragma keep

* Fix includes

* Fix more IWYU

* Try to fix IWYU

* Try to fix IWYU 2

* Fix all IWYU warnings

* Address some code review somments

* Address one more comment

* Address more CR comments

* Address more CR comments

* Address more CR comments

* Address more CR comments

* Address more CR comments

* Add log_context_property_basic_types_int tests

* Added some int tests

* Address more CR comments

* Address some more CR comments

* Address more CR comments

* Remove backticks from code

* Fix failing log_context_ut

* Fix build errors

* Fix IWYU errors
2022-10-04 23:58:05 -07:00
Dan Cristoloveanu 7bc8b94d95
Add 32, 16 and 8 bit integers support (#98)
* Add 32, 16 and 8 bit integers support

* Address CR comments

* Fix iwyu

* Fix iwyu
2022-08-18 15:48:55 -07:00
Dan Cristoloveanu 7ade0dc546
Implement int32_t log context property type and add log context property type interface (#97)
* Implement int32_t log context property type and add log context property type interface

* Fix iwyu errors on Linux
2022-08-17 15:22:22 -07:00
Dan Cristoloveanu 86944b4f06
Add log sink header and spec (#96)
* Add log sink header and specs

* Address CR comments
2022-08-15 22:29:35 -07:00
Dan Cristoloveanu 10d75614e8
Add v2 logging devdoc .md (#94)
* Add v2 logging devdoc .md

* Address some comments

* Update md

* Add context type and other small md updates
2022-08-15 15:28:28 -07:00