Add loglevel argument.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2411 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2000-06-05 06:18:20 +00:00
parent dd13bbf553
commit abccd9747b
4 changed files with 24 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2000-06-04 Dave Peticolas <dave@krondo.com>
* src/engine/util.c: add log level modification functions.
* src/scm/command-line.scm: add a --loglevel argument to set the
logging level.
2000-06-04 Rob Browning <rlb@cs.utexas.edu>
* */Makefile.am and others: fix up make dist to build a full-blown

View File

@ -43,6 +43,12 @@
(lambda (val)
(gnc:config-var-value-set! gnc:*debugging?* #f val))))
(cons
"loglevel"
(cons 'integer
(lambda (val)
(gnc:config-var-value-set! gnc:*loglevel* #f val))))
(cons
"nofile"
(cons 'boolean

View File

@ -58,7 +58,10 @@
(gnc:config-var-value-get gnc:*arg-show-help*))
(begin
(gnc:prefs-show-usage)
(gnc:shutdown 0))))
(gnc:shutdown 0)))
(if (gnc:config-var-value-get gnc:*loglevel*)
(gnc:set-log-level-global (gnc:config-var-value-get gnc:*loglevel*))))
(define (gnc:shutdown exit-status)

View File

@ -449,6 +449,13 @@ the account instead of opening a register." #f))
#f))
(gnc:config-var-value-set! gnc:*debugging?* #f current-value))
(define gnc:*loglevel*
(gnc:make-config-var
"Logging level from 0 (least logging) to 5 (most logging)."
(lambda (var value) (if (exact? value) (list value) #f))
eq?
#f))
;; Convert the temporary startup value into a config var.
(let ((current-load-path gnc:*load-path*))
(set!