casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
logsink.py
Go to the documentation of this file.
00001 # This file was automatically generated by SWIG (http://www.swig.org).
00002 # Version 2.0.5
00003 #
00004 # Do not make changes to this file unless you know what you are doing--modify
00005 # the SWIG interface file instead.
00006 
00007 
00008 
00009 from sys import version_info
00010 if version_info >= (2,6,0):
00011     def swig_import_helper():
00012         from os.path import dirname
00013         import imp
00014         fp = None
00015         try:
00016             fp, pathname, description = imp.find_module('_logsink', [dirname(__file__)])
00017         except ImportError:
00018             import _logsink
00019             return _logsink
00020         if fp is not None:
00021             try:
00022                 _mod = imp.load_module('_logsink', fp, pathname, description)
00023             finally:
00024                 fp.close()
00025             return _mod
00026     _logsink = swig_import_helper()
00027     del swig_import_helper
00028 else:
00029     import _logsink
00030 del version_info
00031 try:
00032     _swig_property = property
00033 except NameError:
00034     pass # Python < 2.2 doesn't have 'property'.
00035 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
00036     if (name == "thisown"): return self.this.own(value)
00037     if (name == "this"):
00038         if type(value).__name__ == 'SwigPyObject':
00039             self.__dict__[name] = value
00040             return
00041     method = class_type.__swig_setmethods__.get(name,None)
00042     if method: return method(self,value)
00043     if (not static):
00044         self.__dict__[name] = value
00045     else:
00046         raise AttributeError("You cannot add attributes to %s" % self)
00047 
00048 def _swig_setattr(self,class_type,name,value):
00049     return _swig_setattr_nondynamic(self,class_type,name,value,0)
00050 
00051 def _swig_getattr(self,class_type,name):
00052     if (name == "thisown"): return self.this.own()
00053     method = class_type.__swig_getmethods__.get(name,None)
00054     if method: return method(self)
00055     raise AttributeError(name)
00056 
00057 def _swig_repr(self):
00058     try: strthis = "proxy of " + self.this.__repr__()
00059     except: strthis = ""
00060     return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
00061 
00062 try:
00063     _object = object
00064     _newclass = 1
00065 except AttributeError:
00066     class _object : pass
00067     _newclass = 0
00068 
00069 
00070 class logsink(_object):
00071     """Proxy of C++ casac::logsink class"""
00072     __swig_setmethods__ = {}
00073     __setattr__ = lambda self, name, value: _swig_setattr(self, logsink, name, value)
00074     __swig_getmethods__ = {}
00075     __getattr__ = lambda self, name: _swig_getattr(self, logsink, name)
00076     __repr__ = _swig_repr
00077     def __init__(self): 
00078         """__init__(self) -> logsink"""
00079         this = _logsink.new_logsink()
00080         try: self.this.append(this)
00081         except: self.this = this
00082     __swig_destroy__ = _logsink.delete_logsink
00083     __del__ = lambda self : None;
00084     def origin(self, *args, **kwargs):
00085         """
00086         origin(self, fromwhere) -> bool
00087 
00088         Summary
00089                 Set the origin of the message
00090 
00091         Input Parameters:
00092                 fromwhere        The origin of a log messages 
00093                 
00094         --------------------------------------------------------------------------------
00095                       
00096         """
00097         return _logsink.logsink_origin(self, *args, **kwargs)
00098 
00099     def filter(self, *args, **kwargs):
00100         """
00101         filter(self, level=string("DEBUG2")) -> bool
00102 
00103         Summary
00104                 Set the filter level
00105 
00106         Input Parameters:
00107                 level            Level of messages to display to the console/log file ERROR WARN INFO INFO1 INFO2 INFO3 INFO4 INFO5 DEBUG DEBUG1 DEBUG2 INFO 
00108                 
00109         --------------------------------------------------------------------------------
00110                       
00111         """
00112         return _logsink.logsink_filter(self, *args, **kwargs)
00113 
00114     def post(self, *args, **kwargs):
00115         """
00116         post(self, message, priority=string("INFO"), origin=string("")) -> bool
00117 
00118         Summary
00119                 Post a message
00120 
00121         Input Parameters:
00122                 message          Message to be posted 
00123                 priority         Priority of message to be posted INFO 
00124                 origin           Origin of message to be posted 
00125                 
00126         --------------------------------------------------------------------------------
00127                       
00128         """
00129         return _logsink.logsink_post(self, *args, **kwargs)
00130 
00131     def postLocally(self, *args, **kwargs):
00132         """
00133         postLocally(self, message, priority=string("INFO"), origin=string("")) -> bool
00134 
00135         Summary
00136                 Post locally
00137 
00138         Input Parameters:
00139                 message          Message to be posted 
00140                 priority         Priority of message to be posted INFO 
00141                 origin           Origin of message to be posted 
00142                 
00143         --------------------------------------------------------------------------------
00144                       
00145         """
00146         return _logsink.logsink_postLocally(self, *args, **kwargs)
00147 
00148     def localId(self):
00149         """
00150         localId(self) -> string
00151 
00152         Summary
00153                 Get local ID
00154         --------------------------------------------------------------------------------
00155                       
00156         """
00157         return _logsink.logsink_localId(self)
00158 
00159     def version(self):
00160         """
00161         version(self) -> string
00162 
00163         Summary
00164                 version of CASA
00165         --------------------------------------------------------------------------------
00166                       
00167         """
00168         return _logsink.logsink_version(self)
00169 
00170     def id(self):
00171         """
00172         id(self) -> string
00173 
00174         Summary
00175                 Get ID
00176         --------------------------------------------------------------------------------
00177                       
00178         """
00179         return _logsink.logsink_id(self)
00180 
00181     def setglobal(self, isglobal=True):
00182         """
00183         setglobal(self, isglobal=True) -> bool
00184 
00185         Summary
00186                 Set this logger to be the global logger
00187 
00188         Input Parameters:
00189                 isglobal         Use as global logger true 
00190                 
00191         --------------------------------------------------------------------------------
00192                       
00193         """
00194         return _logsink.logsink_setglobal(self, isglobal)
00195 
00196     def setlogfile(self, *args, **kwargs):
00197         """
00198         setlogfile(self, filename=string("casapy.log")) -> bool
00199 
00200         Summary
00201                 Set the name of file for logger output
00202 
00203         Input Parameters:
00204                 filename         filename for logger casapy.log 
00205                 
00206         --------------------------------------------------------------------------------
00207                       
00208         """
00209         return _logsink.logsink_setlogfile(self, *args, **kwargs)
00210 
00211     def showconsole(self, onconsole=False):
00212         """
00213         showconsole(self, onconsole=False) -> bool
00214 
00215         Summary
00216                 Choose to send messages to the console/terminal
00217 
00218         Input Parameters:
00219                 onconsole        All messages to the console as well as log file false 
00220                 
00221         --------------------------------------------------------------------------------
00222                       
00223         """
00224         return _logsink.logsink_showconsole(self, onconsole)
00225 
00226     def logfile(self):
00227         """
00228         logfile(self) -> string
00229 
00230         Summary
00231                 Returns the full path of the log file
00232         --------------------------------------------------------------------------------
00233                       
00234         """
00235         return _logsink.logsink_logfile(self)
00236 
00237 logsink_swigregister = _logsink.logsink_swigregister
00238 logsink_swigregister(logsink)
00239 
00240 # This file is compatible with both classic and new-style classes.
00241 
00242