2

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
Thorsten Niehues
  • 13,712
  • 22
  • 78
  • 113
  • Hi, what's the exact error/warning you're getting in the logs? – TrojanName Aug 21 '15 at 12:53
  • [17/Aug/2015:17:01:03][548.18446744073046947584][-default:132-] Notice: Deprecated proc ad_get_user_id used: called from im_header {} {} called from template::adp_parse /web/projop/packages/intranet-core/www/master .... – Thorsten Niehues Aug 24 '15 at 11:13
  • Additionally the log contains often output of the deprecated functions - which is very much – Thorsten Niehues Aug 24 '15 at 11:14

2 Answers2

1

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.

Thorsten Niehues
  • 13,712
  • 22
  • 78
  • 113
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"
}
TrojanName
  • 4,853
  • 5
  • 29
  • 41
  • The config file has the entry `set debug false` but the warning was still in the log-file – Thorsten Niehues Aug 24 '15 at 11:12
  • Ok, ideally you should post your config file to figure out why it's ignoring the debug false. I've updated my answer above with more info about the config file. – TrojanName Aug 24 '15 at 13:45
  • @ThorstenNiehues Do you need more help? If this or another answer was helpful to you and answered your question, please don't forget to accept that answer. – TrojanName Aug 26 '15 at 20:02
  • Unfortunately it does not help. ns_param debug false was already set in the config. I updated the answer with part of the config – Thorsten Niehues Aug 27 '15 at 14:34
  • @ThorstenNiehues I have edited my answer. You may also need to turn off debugging in the **ns_section ns/parameters** section. Also have you tried the 2nd suggestion I gave (commenting out the "set log_code" line)? – TrojanName Aug 27 '15 at 14:45
  • I assume that alternative 2 is working and a good work - around (better than removing the deprecated tag). Do you know where the ad_proc args method is called from? I have trouble finding it out using `grep -inr args packages` – Thorsten Niehues Aug 28 '15 at 07:28
  • You should be able to see ad_proc if you go to /api-doc/proc-view?proc=ad_proc in your browser. It's defined in packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl Did you try my most recent suggestion (to turn off debugging in the ns_section ns/parameters section)? – TrojanName Aug 28 '15 at 10:39
  • as I said I'm sure it works - but at the moment I'm happy with both workarounds (I removed the deprecated tag to get rid of the warnings). Now it would be nice to know which config setting to change - also for other users. I'll look further into it when I'm back from vacation in mid September - Thx for your helps so far – Thorsten Niehues Aug 28 '15 at 12:13
  • If you're happy that the answer works, please remember to accept my answer to the question. I'm happy to help you with further questions both here and on your other question. – TrojanName Aug 28 '15 at 13:57