075c7923 | 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: I21d2ca8065f24fd73509229c517f5caf48934b60 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
6ddbf69e | 05-Sep-2023 |
Willy Tu <wltu@google.com> |
Remove SDBUSPP_REMOVE_DEPRECATED_NAMESPACE
Fix the code to support new sdbusplus error without SDBUSPP_REMOVE_DEPRECATED_NAMESPACE.
Change-Id: I12713ec1757d3835e1acf07c7abf409ff97615e1 Signed-off-b
Remove SDBUSPP_REMOVE_DEPRECATED_NAMESPACE
Fix the code to support new sdbusplus error without SDBUSPP_REMOVE_DEPRECATED_NAMESPACE.
Change-Id: I12713ec1757d3835e1acf07c7abf409ff97615e1 Signed-off-by: Willy Tu <wltu@google.com>
show more ...
|
22e8695f | 09-Jun-2023 |
Ivan Mikhaylov <fr0st61te@gmail.com> |
phosphor-logging: add rsyslog configuration for TCP, UDP
Add possibility to set TCP or UDP as transport protocol for rsyslog configuration.
Depends on change of dbus interfaces in: https://gerrit.o
phosphor-logging: add rsyslog configuration for TCP, UDP
Add possibility to set TCP or UDP as transport protocol for rsyslog configuration.
Depends on change of dbus interfaces in: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/64224
Tested: "@" set for UDP and "@@" for TCP in configuration file.
Change-Id: Ie849fb64b5e6cc8d87d7a984cd4d326e39aeb4ea Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com>
show more ...
|
2544b419 | 04-Oct-2022 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: update with latest
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I329396457b83bb2eb8740629b4ac1fbe9106bced |
45e83521 | 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ibc25db433a6926f7ee43ea83312c3ac14f480c33
show more ...
|
445665af | 17-Mar-2022 |
Paul Fertser <fercerpav@gmail.com> |
rsyslog-config: fix disabled config
When no remote syslog is used action ~ (drop) isn't appropriate as it inhibits processing of the current message for any additional configs that might come after
rsyslog-config: fix disabled config
When no remote syslog is used action ~ (drop) isn't appropriate as it inhibits processing of the current message for any additional configs that might come after server.conf. This file shouldn't be empty either as there're no other output actions defined in default configuration.
Make it a no-op by sending to /dev/null instead. Add a linefeed at the end so that "cat server.conf" would look nicer.
Signed-off-by: Paul Fertser <fercerpav@gmail.com> Change-Id: I6636c76cf0304b3c36f579225846ab19e992c333
show more ...
|
6ef6b25e | 30-Mar-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping.
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping. It is time to remove this boolean to make it more observable which actions are being used in applications. Map all `true` occurrences to `action::defer_emit`.
Change-Id: I21f8e8d8e988ee29933b544fd4ffd8bf0fe3963c Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
511a4752 | 28-Aug-2021 |
Patrick Williams <patrick@stwcx.xyz> |
rsyslog-config: warning due to bad std::move
Clang reports the following warning: ``` ../phosphor-rsyslog-config/server-conf.cpp:124:18: warning: moving a temporary object prevents copy elision [-Wp
rsyslog-config: warning due to bad std::move
Clang reports the following warning: ``` ../phosphor-rsyslog-config/server-conf.cpp:124:18: warning: moving a temporary object prevents copy elision [-Wpessimizing-move] result = std::move(NetworkClient::address(value)); ^ ```
Calling std::move on a temporary is useless and does, as clang rightly warns, actually make things worse by preventing copy-elision.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I3246810dd786a3fb0dceeed09fcf22e4e30b4df8
show more ...
|
e0538848 | 11-Jun-2021 |
William A. Kennington III <wak@google.com> |
build: Refactor to separate out library
This makes it more clear what code is intended for use by the phosphor-logging shared library. This is especially nice since it isolates the `phosphor_logging
build: Refactor to separate out library
This makes it more clear what code is intended for use by the phosphor-logging shared library. This is especially nice since it isolates the `phosphor_logging_dep` to only provide the exported headers instead of everything in the project.
Additionally, this adds an option to build only the library components of the project when the services aren't needed.
Change-Id: Ied0858fc70e8054df4c056d91f35a6f0b3acfcb1 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
b6b25575 | 19-May-2021 |
William A. Kennington III <wak@google.com> |
build: Use global variables instead of macros for test features
We don't want the build to depend on recompiling objects for test separately from other executables. We can tweak settings via global
build: Use global variables instead of macros for test features
We don't want the build to depend on recompiling objects for test separately from other executables. We can tweak settings via global variables instead.
Change-Id: Ifdd078c2e381848ca1789934a36731eb8ceaf8b1 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
ef9cc07e | 30-Apr-2021 |
Patrick Williams <patrick@stwcx.xyz> |
build: remove autotools support
We use meson everywhere now. Clean up the autotools support.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Iac94c9c6e92141d8d1928c5283c8757ab2fd3257 |
b2b27085 | 16-Apr-2021 |
Patrick Williams <patrick@stwcx.xyz> |
build: meson support for rsyslog-config
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I5292ce1d09596f0d2e84c5d58490a9afe2b954db |
a1c4338e | 15-Apr-2021 |
Lei YU <yulei.sh@bytedance.com> |
rsyslog-config: Support IPv6 address
The IPv6 address requires `[]` in the config file. Add support for this format so that user could set IPv6 address on DBus, and this service will add `[]` in the
rsyslog-config: Support IPv6 address
The IPv6 address requires `[]` in the config file. Add support for this format so that user could set IPv6 address on DBus, and this service will add `[]` in the config file to make it work correctly.
Split the logic in restore() into a separate function parseConfig() so that it is easier to test.
Tested: Verify both IPv4 and IPv6 address could be set to rsyslog-config and verify it works correctly. Added several IPv6 related test cases.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I2135e3b0e916947449ab5d0cfa9669a98349226e
show more ...
|
a40c2165 | 22-Apr-2021 |
Patrick Williams <patrick@stwcx.xyz> |
rsyslog-config: fix memory leak in addressValid
Fixed memory leak reported by LeakSanitizer by using 'freeaddrinfo' after corresponding 'getaddrinfo' call.
ERROR: LeakSanitizer: detected memory
rsyslog-config: fix memory leak in addressValid
Fixed memory leak reported by LeakSanitizer by using 'freeaddrinfo' after corresponding 'getaddrinfo' call.
ERROR: LeakSanitizer: detected memory leaks
Direct leak of 64 byte(s) in 1 object(s) allocated from: #0 0x7f9e9ccba727 in __interceptor_malloc (/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/libasan.so.6+0xb1727) #1 0x7f9e957dbd07 (/lib64/libc.so.6+0xe5d07) #2 0x7f9e957dd08b in getaddrinfo (/lib64/libc.so.6+0xe708b) #3 0x7f9e9cc940aa (/usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/libasan.so.6+0x8b0aa) #4 0x5619f832d16f in phosphor::rsyslog_config::Server::addressValid(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ../phosphor-rsyslog-config/server-conf.cpp:121
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia7984cd6516ffbe57ed2859fee98366fa3a90f9e
show more ...
|
0e734dfa | 16-Apr-2021 |
Patrick Williams <patrick@stwcx.xyz> |
rsyslog-config: fix compile warnings under -Werror
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I13081a2f5e98a76cbc708ad1c987ee76e311c6ae |
81a91e3e | 28-May-2020 |
Patrick Williams <patrick@stwcx.xyz> |
build: add correct libsystemd dependency
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia6bb8d347f76ec3a6e8f8babe7da3e63cab907c0 |
0a0b5ea5 | 22-May-2019 |
Santosh Puranik <santosh.puranik@in.ibm.com> |
rsyslod: Change disable action
This commit changes the way remote logging is disabled. Prior to this, we would create/delete the RSYSLOG_SERVER_CONFIG_FILE to enable/disable remote logging.
Deletin
rsyslod: Change disable action
This commit changes the way remote logging is disabled. Prior to this, we would create/delete the RSYSLOG_SERVER_CONFIG_FILE to enable/disable remote logging.
Deleting the file would cause systemd to spin while it tried to trigger the syslog service via socket activation. So this commit reverts commits 40a7406097c0b5b0670c5987f6fe8c902d65562d and e165ea956c5557c2b470869d252c80744227b00f and then:
To disable remote logging, we now simply ask that rsyslog ignore all incoming messages. This is done by using a special '~' rule for all messages.
Tested: -- Verified that systemd no longer spins while trying to activate rsyslog with default config. -- Verified that setting a remote logging server over the REST API still works.
Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com> Change-Id: Ife217a84395aaf32b775b7a84f85fc6310df3e7c
show more ...
|
e731044c | 28-Mar-2019 |
Patrick Venture <venture@google.com> |
build: install into bin instead of sbin
Installs into bin instead of sbin per guidelines
Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I382022b4f09374132cf07232177a5145c425f758 |
e5e3a9cc | 03-Apr-2019 |
William A. Kennington III <wak@google.com> |
utils: restart: Fix restart bug
bc89289f48ce5e1c8e5c66e657a176a0cd881d39 introduced a regression in the type signature of the RestartUnit call. The "replace" argument was accidentally deleted.
Chan
utils: restart: Fix restart bug
bc89289f48ce5e1c8e5c66e657a176a0cd881d39 introduced a regression in the type signature of the RestartUnit call. The "replace" argument was accidentally deleted.
Change-Id: I44313997b8b72b7163ad8b43ed2b45a01cb54e44 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
bc89289f | 01-Apr-2019 |
William A. Kennington III <wak@google.com> |
utils: restart: Always restart service
If the service has hit its reset limit in systemd, calling RestartUnit on the service will do nothing. This ensures that the service will try and restart at le
utils: restart: Always restart service
If the service has hit its reset limit in systemd, calling RestartUnit on the service will do nothing. This ensures that the service will try and restart at least once after a configuration change, regardless of whether or not it has failed in the past.
Change-Id: I28962fc4ef9da641d1d19b8e09450e40d76e9c27 Signed-off-by: William A. Kennington III <wak@google.com>
show more ...
|
40a74060 | 14-Jan-2019 |
Deepak Kodihalli <dkodihal@in.ibm.com> |
Fix regression with e165ea9
Commit e165ea9 introduces creation of the remote logging config file on demand, but it presumed the directory housing this config file pre-exists. That was not the case.
Fix regression with e165ea9
Commit e165ea9 introduces creation of the remote logging config file on demand, but it presumed the directory housing this config file pre-exists. That was not the case.
Change-Id: I8974ce798de5d2747bcc4a67209f4d2c8081cfe6 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
show more ...
|
e165ea95 | 11-Jan-2019 |
Deepak Kodihalli <dkodihal@in.ibm.com> |
rsyslogd: don't start without actions
Rsyslog is currently used only for remote logging. The daemon would run though (started by systemd) even when remote logging has not been configured. In other w
rsyslogd: don't start without actions
Rsyslog is currently used only for remote logging. The daemon would run though (started by systemd) even when remote logging has not been configured. In other words, it would run without any actions.
With Yocto 2.6, rsyslogd won't run without any actions. Hence, rsyslogd is now started only on the condition that the remote logging config file is present.
Change-Id: Iae11d6912e60765ecb774b663d44b4e3c6f381a3 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
show more ...
|
59a6b1f2 | 29-Aug-2018 |
Patrick Venture <venture@google.com> |
add sdjournal interface to inject tests
The goal of the tests is not to test phosphor-logging, but rather allow code to call through phosphor-logging/log<> during a test.
Change-Id: Id8c84ded473dec
add sdjournal interface to inject tests
The goal of the tests is not to test phosphor-logging, but rather allow code to call through phosphor-logging/log<> during a test.
Change-Id: Id8c84ded473decc7f9f0be268116083093f86e54 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|
30047bf9 | 01-Nov-2018 |
Patrick Venture <venture@google.com> |
minor cleanup, std namespacing
Added std namespace to places where there is a cpp version.
Change-Id: I60a05a7c9cdcd79cfffc3c4968005fcbe34acf81 Signed-off-by: Patrick Venture <venture@google.com> |
e790759d | 31-Oct-2018 |
Patrick Venture <venture@google.com> |
build: phosphor-rsyslog-config: drop invalid library
The line in the makefile for including the phosphor-logging isn't populated during build in neither the CI nor the obmc-phosphor-image build.
"p
build: phosphor-rsyslog-config: drop invalid library
The line in the makefile for including the phosphor-logging isn't populated during build in neither the CI nor the obmc-phosphor-image build.
"phosphor_rsyslog_conf-server-conf.o -lsdbusplus -lsystemd -lphosphor_dbus"
Tested: Verified CI still builds both. Tested: Verified the build line from the compile log doesn't populate that line with any value. Change-Id: I4ec8c44d6a717f011118826149e64d2dd2c56d52 Signed-off-by: Patrick Venture <venture@google.com>
show more ...
|