source: branches/testScripts/NBlogMessages.py @ 710

Last change on this file since 710 was 710, checked in by stefan, 13 years ago

allow to have parameters that are defined only in the default file and not the users parameter file

  • Property svn:eol-style set to native
File size: 712 bytes
Line 
1#! /usr/bin/env python
2
3import time
4
5execfile('NBuserParametersDefault.py')
6execfile('NBuserParameters.py')
7
8#TODO: one could open the logfile once in the beginning, set it to sys.stdout, flush after each message, and close it finally
9
10#------------------------------------------------------------------------
11# Function to write log messages
12#------------------------------------------------------------------------
13def writeMessage( msg ) :
14  logMsg = time.ctime(time.time())+': '
15  logMsg += msg
16  if LOGPRINT :
17    print logMsg
18  if len(LOGFILE) > 0 and not LOGFILE.isspace() :
19    logfile=open(NIGHTLY_BUILD_ROOT_DIR+'/'+LOGFILE, 'a')
20    logfile.write(logMsg+'\n')
21#    logfile.flush()
22    logfile.close()
Note: See TracBrowser for help on using the repository browser.