hercules-390 / hyperion

Hercules 390
Other
252 stars 68 forks source link

msglevel debug does not show line number #113

Closed jphartmann closed 8 years ago

jphartmann commented 8 years ago
HHC01603I help msglevel                                                                                                                                                           
HHC01603I                                                                                                                                                                         
HHC01602I Command      Description                                                                                                                                                
HHC01602I -------      -------------------------------------------------------                                                                                                    
HHC01602I msglevel    *Display/Set current Message Display output                                                                                                                 
HHC01603I                                                                                                                                                                         
HHC01603I Format:  msglevel  [verbose|terse|debug|nodebug|emsgloc|noemsgloc]                                                                                                      
HHC01603I                                                                                                                                                                         
HHC01603I    verbose     Display messages during configuration file processing                                                                                                    
HHC01603I    terse       Do not display configuration file processing messages                                                                                                    
HHC01603I    debug       Prefix messages with filename and line number                                                                                                            
HHC01603I    nodebug     Display messages normally                                                                                                                                
HHC01603I    emsgloc     Show where error messages originated                                                                                                                     
HHC01603I    noemsgloc   Do not show where error messages originated                                                                                                              
HHC01603I      

But:

../hyperion/cmdta HHC01603I ldmod dyncrypt                                                                                                                                        
../hyperion/hsccm HHC01526I HDL: loading module dyncrypt...                                                                                                                       
../hyperion/hdl.c HHC01516E HDL: unable to open dll dyncrypt: file not found                                                                                                      
../hyperion/cmdta HHC90000D DBG: RC = 0                                       

Is the prefix field too short? When building out-of-source the leading path is inevitable in the __FILE__ macro, but you could, e.g., strrchr(__FILE__, '/') to find just the file name.

Fish-Git commented 8 years ago

The vfwritemsg function in source module logmsg.c uses the TRIMLOC macro (which calls into the trimloc function defined in source module hscutl.c) because of a similar __FILE__ macro issue on Windows.

You'll probably have to make an adjustment (fix) to the trimloc function in source module hscutl.c to ensure only a source file name and extension is returned.

jphartmann commented 8 years ago

Thanks, Fish.

Turns out that msglevel emsgloc provides complete information, so I'll close this.