Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-07-2014, 04:03 PM
raistlin raistlin is online now
Registered User
 
Join Date: 11-14-2008
Posts: 23
How to propagate loglevel to child bld files?

Hi,

I would like to limit the amount of information / logs produced by my bld script to the console. I use Jenkins, so i would very much like to achieve a much smaller blueprint of logs.

This is the command line i use for my continuous integration build:
Code:
VisBuildcmd.exe Build.bld /loglevel vbldLogLevelError
When the build is successful, the logs produced is of course minimal. But when the build fails, i use LogMessage2 with vbldLogLevelError to ensure errors that i want to see is visible on the console. No problem with this setup.

Now, when i have a child bld script that i call within Build.bld, /loglevel information is not propagated to that executing process, so i get a vbldLogLevelNormal verbosity from the child bld.

How can i propagate /loglevel being parsed from the parent bld script, to child scripts?

Thank you.
Lee
Reply With Quote
  #2  
Old 11-07-2014, 05:16 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Pass in another macro value with the log level and use that when calling the child project, specifying the log level.
Reply With Quote
  #3  
Old 11-07-2014, 05:57 PM
raistlin raistlin is online now
Registered User
 
Join Date: 11-14-2008
Posts: 23
Thanks. Can you also include a small snippet with VBS on how to set the loglevel in the child when received?

On how to use the following:
Code:
Options.LogLevel As LogLevelEnum
I can iterate macros, but not sure which property to set with the temp loglevel macro value received in the child script.

Please excuse my inability to pickup VBS. Thanks for the help.
Reply With Quote
  #4  
Old 11-07-2014, 11:14 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Code:
Application.Options.LogLevel = %LEVEL_MACRO%
Reply With Quote
  #5  
Old 11-08-2014, 07:17 AM
raistlin raistlin is online now
Registered User
 
Join Date: 11-14-2008
Posts: 23
Thank you.
Reply With Quote
  #6  
Old 11-10-2014, 08:34 AM
raistlin raistlin is online now
Registered User
 
Join Date: 11-14-2008
Posts: 23
I found an interesting observation. Please correct me if i am wrong. In the documentation, it says:

Code:
vbldLogLevelNone 0 No calls to LogMessage will be logged. 
vbldLogLevelError 1 Only error level messages will be logged. 
vbldLogLevelWarning 2 Only error and warning level error messages will be logged. 
vbldLogLevelNormal 3 Errors, warnings, and normal level error messages will be logged. 
vbldLogLevelDetailed 4 Errors, warnings, normal, and detailed error messages will be logged. 
vbldLogLevelDiagnostic 5 Errors, warnings, normal, detailed, and diagnostic error messages will be logged.
But the number associated with these parameters are off by 1.
vbldLogLevelNone starts at -1, vbldLogLevelError at 0 and so on.

I tested this with:

Code:
Builder.LogMessage2 "vbldLogLevelError = " & vbldLogLevelError, vbldLogLevelError
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 03:23 PM.


Copyright © 1999-2023 Kinook Software, Inc.