From: Andrey C. <sku...@us...> - 2006-11-15 10:37:32
|
Update of /cvsroot/eas-dev/eas/client In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv19212/client Modified Files: main.prg Log Message: Unify log messages Index: main.prg =================================================================== RCS file: /cvsroot/eas-dev/eas/client/main.prg,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- main.prg 3 Nov 2006 16:12:06 -0000 1.10 +++ main.prg 15 Nov 2006 10:37:18 -0000 1.11 @@ -13,7 +13,7 @@ #include "../version.ch" #define PRG_NAME "eas" -#define DEBUG 15 +#define DEBUG 30 // Default connection values #define C_HOST "localhost" @@ -79,7 +79,7 @@ login() applicationQuit() recover using oErr - eDebug(1, "EXCEPTION:",errorMessage(oErr)) + eDebug( 1, errorMessage(oErr) ) applicationQuit() return 1 end sequence @@ -109,7 +109,7 @@ return .F. endif - eDebug(15, "Current directory:", cygwinroot()+PATH_DELIM+curDir() ) + eDebug( 21, "Current directory:", cygwinroot()+PATH_DELIM+curDir() ) return .T. @@ -121,14 +121,14 @@ return NIL endif - eDebug(10, "Login to server...") + eDebug( 21, "Login to server...") // Get connections parameters from command line if exist cfg := EASGetConfig() if valtype(cfg:connection) == 'O' loginParams:name := cfg:connection:user loginParams:password := cfg:connection:password - eDebug(10, "LOGIN PARAMS:",loginParams) + eDebug(31, "Login parameters:",loginParams) endif // Prepare packet @@ -139,14 +139,14 @@ // Read answer from server vRet := sendMessage(,'sys.transport.default', 'read') - eDebug(5, "LOGIN ANSWER:", vRet) + eDebug( 21, "Login answer:", vRet) if valtype(vRet) <> 'O' .or. .not. 'ANSWER' $ vRet .or. .not. vRet:answer // Access denied if loginWindow != NIL loginWindow:dialogBox(i18n("ERROR"),i18n("Access denied.&\nPlease, contact your system administratior."),,,NIL, IMG_ERROR) endif - eDebug(1,"&\n=== Access denied. ===&\n") + eDebug( 1, "Access denied. Program is terminated.") return NIL endif @@ -159,14 +159,14 @@ aadd( params, 'dbpath' ) aadd( params, cfg:dbPath ) endif - eDebug( 15, "Execute:", params) + eDebug( 31, "Execute from command line:", params) res := component( params ) - eDebug( 15, "Result:", res ) + eDebug( 31, "Execution result:", res ) return NIL endif /* quit on failed to open main window */ - eDebug( 12, "Open main form") + eDebug( 21, "Open main form") if .not. lcomponent('sys.ui', 'openForm', 'name', EAS_MAIN_FORM ) // form := map() // form:name := EAS_MAIN_FORM @@ -176,7 +176,7 @@ packet := messageNew( 'session', 'close', NIL ) sendMessage(,'sys.transport.default', 'write', packet ) - eDebug(1, "ERROR: Cannot open main form.") + eDebug( 1, "Cannot open main form.") if loginWindow != NIL loginWindow:dialogBox(i18n("ERROR"),i18n("Cannot open main form."),,,NIL, IMG_ERROR) endif @@ -196,13 +196,13 @@ local server, port if loginInProgress == 1 - eDebug(1, "Error connect to server") + eDebug( 1, "Error connect to server" ) loginInProgress := 2 loginWindow:dialogBox(i18n("ERROR"),i18n("Cannot connect to server!&\nContact your system administratior."),,,NIL, IMG_ERROR) return .F. endif - eDebug(25, "connectionDialog()") + eDebug( 21, "connectionDialog()" ) // Read from config file cfg := EASGetConfig() @@ -283,7 +283,7 @@ function sessionBegin(win) local cfg, cHost, cPort, cUser, cPass, conn:=map() // ... - eDebug(15, "sessionBegin()") + eDebug( 21, "sessionBegin()" ) // Write connection parameters to ini file cfg := EASGetConfig() @@ -296,7 +296,7 @@ cfg:setValue("session","port", cPort) cfg:save() if .not. empty(cfg:error) - eDebug(1, "ERROR:"+cfg:error) + eDebug( 1, cfg:error ) endif // Pass parameters to login @@ -323,7 +323,7 @@ /* Quit from application */ function applicationQuit() - eDebug(10, "Quitting...") + eDebug( 11, "Quitting..." ) messages:close() // Remove all files from cache directory fileDelete('*') |