Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
CamiTK Community Edition
CamiTK Community Edition
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 17
    • Issues 17
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 2
    • Merge Requests 2
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • CamiTK
  • CamiTK Community EditionCamiTK Community Edition
  • Issues
  • #23

Closed
Open
Opened Mar 05, 2018 by Emmanuel Promayon@promayoeOwner0 of 2 tasks completed0/2 tasks

Force log level at exec time

As a CEP developer
I would like to change the log level and parameters at run time
So that I don't have to re-compile my executable eveytime I need to check something or diagnose a problem
Epic/Topics Log system

Description / Overview

Choose one of (or both) solution:

  1. enable the possibility to force the log parameter using environment variable, e.g.::ab:
CAMITK_LOG_LEVEL=WARNING CAMITK_LOG_TO_STDOUT=FALSE CAMITK_LOG_TO_FILE=TRUE CAMITK_LOG_FILE_DIRECTORY=/tmp camitk-imp"

to force camitk-imp running with these log parameters instead of those defined in source or settings Caveat: you need to modify the environment variable and access to it from the code. Not really a problem, but can be tricky for people who don't understand it properly, modify their global environment (e.g. in ~/.bashrc) and then forgot they had define these things.

  1. manage a --debug=[options] argument from the command line execution for all CamiTK application with different options:
log level:
le (error)
lw (warning)
li (info)
lt (trace)

d (display debug)

s (display time stamp)

log message:
me
mw
mi
mt
p

Hints

  • Use Qt to read the environment variables and modify the application properties accordingly
  • Add a flag to camitk-imp and camitk-config arguments

Acceptance tests

  • there are more tests of the testlogger class that shows it work
  • the Log System document is updated accordingly
Edited Jun 12, 2018 by Emmanuel Promayon
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: CamiTK/CamiTK#23