Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "rda_python_common"
version = "1.0.14"
version = "1.0.15"
authors = [
{ name="Zaihua Ji", email="[email protected]" },
]
Expand Down
10 changes: 9 additions & 1 deletion src/rda_python_common/PgLOG.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
'DSIDCHRS' : "d",
'DOSHELL' : False,
'NEWDSID' : True,
'PUSGDIR' : None,
'BCHHOSTS' : "PBS",
'HOSTTYPE' : 'dav', # default HOSTTYPE
'EMLMAX' : 256, # up limit of email line count
Expand Down Expand Up @@ -479,6 +480,13 @@ def get_call_trace(cut = 1):

return str + "\n" if str else ""

#
# get caller file name
#
def get_caller_file(cidx = 0):

return traceback.extract_stack()[cidx][0]

#
# log message, msg, for degugging processes according to the debug level
#
Expand Down Expand Up @@ -556,6 +564,7 @@ def set_help_path(progfile):
#
def show_usage(progname, opts = None):

if PGLOG['PUSGDIR'] is None: set_help_path(get_caller_file())
usgname = join_paths(PGLOG['PUSGDIR'], progname + '.usg')

if opts:
Expand Down Expand Up @@ -1284,7 +1293,6 @@ def set_common_pglog():
SETPGLOG("DRDATAEP", "rda-quasar-drdata") # DRDATA Globus Endpoint on Quasar
SETPGLOG("DBGFILE", "pgdss.dbg") # debug file name
SETPGLOG("CNFPATH", PGLOG['DSSHOME']+"/config") # path to configuration files
SETPGLOG("PUSGDIR", PGLOG['DSSDBHM']+"/prog_usage") # path to program usage files
SETPGLOG("DSSURL", "https://rda.ucar.edu") # current dss web URL
SETPGLOG("RQSTURL", "/datasets/request") # request URL path
SETPGLOG("WEBSERVERS", "rda-web-prod01.ucar.edu:rda-web-test01.ucar.edu") # webserver names for Web server
Expand Down