问题
How to remove the warning in the log-file for using a deprecated proc within openACS, project-open?
Part of the config:
# Debug is turned on for demo servers. Please turn off for
# performance critical production installations.
set debug false
#---------------------------------------------------------------------
#
# Access log -- nslog
#
#---------------------------------------------------------------------
ns_section ns/server/${server}/module/nslog
ns_param debug false
ns_param dev false
ns_param enablehostnamelookup false
ns_param file ${serverroot}/log/${server}.log
ns_param logcombined true
ns_param extendedheaders COOKIE
# ns_param logrefer false
# ns_param loguseragent false
ns_param logreqtime true
ns_param maxbackup 1000
ns_param rollday *
ns_param rollfmt %Y-%m-%d-%H:%M
ns_param rollhour 0
ns_param rollonsignal true
ns_param rolllog true
回答1:
Assuming the warning you're seeing in the error log is of the form:
"Deprecated proc $proc_name used"
There are 2 ways to disable this.
1) In the AOLserver config file, verify/add this (remember to restart AOLserver after)
set debug false
also in the ns/server/${server}/module/nslog section, make sure this line is there
ns_param debug $debug
And, also in the ns_section ns/parameters section, make sure this is set
ns_param debug $debug
2) Alternatively, you can remove or comment out this block from packages\acs-bootstrap-installer\tcl\00-proc-procs.tcl
if { $warn_p } {
set log_code "ns_log Debug \"Deprecated proc $proc_name used\"\n"
}
回答2:
Since I did not find anything on the internet I removed the deprecated tags on the functions (work-around).
The command I used was
for asd in $(grep -l -- '-deprecated ' packages/acs-tcl/tcl/*.tcl); do sed 's/-deprecated //g' $asd > ${asd}2; done
then I moved the filenames vom ${asd}2 to $asd
If there is a -warn
tag in the method definition then it needs to be removed as well - else the function breaks.
来源:https://stackoverflow.com/questions/32117531/how-to-remove-deprecated-warning-in-log-file-of-open-acs-project-open