#!/bin/sh # # Beispiel für Profiler und Logger # \ exec tclsh $0 $@ package require logger package require profiler puts stdout "Listing 1\n" # Initialisierung profiler::init namespace eval anwendung { variable log set log [logger::init Anwendung] ${log}::setlevel info proc A {} { variable log ${log}::info "1" B 1 ${log}::notice "2" B 2 ${log}::debug "erscheint nicht" B 3 ${log}::setlevel debug B 4 } proc B {i} { variable log ${log}::debug "B $i" } } anwendung::A puts stderr [::profiler::print ::anwendung::*]