Permalink
Browse files

add logging infrastructure from firmware-tools

  • Loading branch information...
superchalupa committed Nov 6, 2008
1 parent d649561 commit aa96e7600e97c542e2397d066cf92e862e141a07
View
@@ -37,6 +37,9 @@ include src/py-cli/Makefile.am
include src/bin/Makefile.am
include src/cppunit/Makefile.am
pkgconfdir=$(sysconfdir)/$(PACKAGE)
dist_pkgconf_DATA=etc/logging.conf
CLEANFILES+=_buildtemp smbios-utils*.rpm out
SUBDIRS += po
ACLOCAL_AMFLAGS = -I m4
View
@@ -0,0 +1,46 @@
# vim:et:ts=4:sw=4:tw=80
# INI file.
# This file is read by python ConfigParser module. You can do
# variable interpolation using python-style string interpolation rules.
# loggers
[logger_root]
level: NOTSET
handlers: unadorned_console
[logger_verbose]
level: NOTSET
handlers:
qualname: verbose
[logger_trace]
level: NOTSET
handlers:
qualname: trace
# logging configuration
[formatters]
keys: detailed,simple,unadorned
[handlers]
keys: unadorned_console
[loggers]
keys: root,verbose,trace
[formatter_unadorned]
format: %(message)s
[formatter_simple]
format: %(levelname)s: %(message)s
;useful for debugging:
[formatter_detailed]
format: %(levelname)s %(filename)s, Line: %(lineno)d: %(message)s
[handler_unadorned_console]
class: StreamHandler
args: []
formatter: unadorned
level: INFO
View
@@ -232,6 +232,9 @@ rm -rf %{buildroot}
%doc src/bin/getopts_LICENSE.txt src/include/smbios/config/boost_LICENSE_1_0_txt
%doc doc/pkgheader.sh
%dir %{_sysconfdir}/libsmbios
%config(noreplace) %{_sysconfdir}/libsmbios/*
# legacy C++
%{_sbindir}/dellBiosUpdate
%{_sbindir}/dellLEDCtl
View
@@ -12,17 +12,18 @@ pkgpython_PYTHON = \
src/python/libsmbios_c/smbios.py \
src/python/libsmbios_c/smi.py \
src/python/libsmbios_c/system_info.py \
src/python/libsmbios_c/trace_decorator.py \
src/python/libsmbios_c/peak_util_decorators.py \
src/python/libsmbios_c/token.py \
src/python/_vars.py
DISTCLEANFILES += ./src/python/_vars.py
src/python/_vars.py: src/python/libsmbios_c/_vars.py configure Makefile config.status
mkdir -p $$(dirname $@) ||:
cp $< $@
for var in RELEASE_VERSION PACKAGE localedir libdir libexecdir datadir sysconfdir pythondir pkgpythondir pkgdatadir pkgconfdir pkggladedir pkglibexecdir;\
for var in $(REPLACE_VARS) ;\
do \
echo "replace $$var=\"$${!var}\"" ;\
perl -p -i -e "s|^$$var\s*=.*|$$var=\"$${!var}\"|" $@ ;\
perl -p -i -e "s|^$$var\s*=.*|$$var=\"$${!var}\"|" $@;\
done
# this is only for in-tree use.
@@ -5,14 +5,18 @@
import sys
import gettext
__all__ = ["RELEASE_VERSION", "localedir", "GETTEXT_PACKAGE", "pkgdatadir", "pythondir", "_"]
__all__ = ["RELEASE_VERSION", "GETTEXT_PACKAGE", "_",
"localedir", "pkgdatadir", "pythondir", "pkgconfdir", "libdir",
]
# the following vars are all substituted on install
RELEASE_VERSION="uninstalled-version"
GETTEXT_PACKAGE="libsmbios"
pkgdatadir=os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), "..", "..", "doc")
pythondir=os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), "..", "python")
pkgdatadir=os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), "..", "..", "doc")
localedir=os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), "..", "..", "po")
pkgconfdir=os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), "..", "..", "etc")
libdir=os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), "..", "..", "out", ".libs")
# end vars
t = gettext.translation(GETTEXT_PACKAGE, localedir, fallback=True)
Oops, something went wrong.

0 comments on commit aa96e76

Please sign in to comment.