Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Oct 2009

    Need little help

    Hi I need a good logic as to how implement indentation in my log file that i am creating for my application.

    Suppose I have three functions like M1,M2,M3 and M2 is called from M1 and M3 from M2


    Now in my log file I want something like this

    Can anyone help me with some logic. I guess i have to deal with spaces

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Oslo, Norway

    Re: Need little help

    You could have a variable in your logger object for counting indentation level, and provide some methods for increasing/decreasing it.
    Or store indentation locally, in the methods (and pass it as an argument to the logger).
    Perhaps in a local object residing on the stack - thus its destructor could automatically log when the method is left.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts