Add log tools

This commit is contained in:
Mauricio Baeza 2021-02-07 22:43:49 -06:00
parent 2cb36cc537
commit 7d22cf9688
11 changed files with 161 additions and 23 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -24,3 +24,48 @@ Show in shell.
def info():
app.debug(INFO_DEBUG)
return
**Log error**
^^^^^^^^^^^^^
Show error message in shell.
.. code-block:: python
import easymacro as app
def error():
msg = 'My error 500'
app.error(msg)
return
**Log debug**
^^^^^^^^^^^^^
Show debug message in shell.
.. code-block:: python
import easymacro as app
def error():
msg = 'Verify this data...'
app.debug(msg)
return
**Log info**
^^^^^^^^^^^^^
Show info message in shell.
.. code-block:: python
import easymacro as app
def error():
msg = 'Start process...'
app.info(msg)
return

View File

@ -7,11 +7,4 @@ Tools
.. include:: 00_tools.rst
Documents
---------
Calc
----
.. _Semantic Versioning: https://semver.org/

View File

@ -49,8 +49,6 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="main/easymacro.html">Library easymacro.py</a><ul>
<li class="toctree-l2"><a class="reference internal" href="main/easymacro.html#tools">Tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="main/easymacro.html#documents">Documents</a></li>
<li class="toctree-l2"><a class="reference internal" href="main/easymacro.html#calc">Calc</a></li>
</ul>
</li>
</ul>

View File

@ -51,6 +51,42 @@
<span class="k">return</span>
</pre></div>
</div>
</div>
<div class="section" id="log-error">
<h1><strong>Log error</strong><a class="headerlink" href="#log-error" title="Permalink to this headline"></a></h1>
<p>Show error message in shell.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">easymacro</span> <span class="k">as</span> <span class="nn">app</span>
<span class="k">def</span> <span class="nf">error</span><span class="p">():</span>
<span class="n">msg</span> <span class="o">=</span> <span class="s1">&#39;My error 500&#39;</span>
<span class="n">app</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
<span class="k">return</span>
</pre></div>
</div>
</div>
<div class="section" id="log-debug">
<h1><strong>Log debug</strong><a class="headerlink" href="#log-debug" title="Permalink to this headline"></a></h1>
<p>Show debug message in shell.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">easymacro</span> <span class="k">as</span> <span class="nn">app</span>
<span class="k">def</span> <span class="nf">error</span><span class="p">():</span>
<span class="n">msg</span> <span class="o">=</span> <span class="s1">&#39;Verify this data...&#39;</span>
<span class="n">app</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
<span class="k">return</span>
</pre></div>
</div>
</div>
<div class="section" id="log-info">
<h1><strong>Log info</strong><a class="headerlink" href="#log-info" title="Permalink to this headline"></a></h1>
<p>Show info message in shell.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">easymacro</span> <span class="k">as</span> <span class="nn">app</span>
<span class="k">def</span> <span class="nf">error</span><span class="p">():</span>
<span class="n">msg</span> <span class="o">=</span> <span class="s1">&#39;Start process...&#39;</span>
<span class="n">app</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
<span class="k">return</span>
</pre></div>
</div>
</div>

View File

@ -57,12 +57,42 @@
</pre></div>
</div>
</div>
<div class="section" id="log-error">
<h3><strong>Log error</strong><a class="headerlink" href="#log-error" title="Permalink to this headline"></a></h3>
<p>Show error message in shell.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">easymacro</span> <span class="k">as</span> <span class="nn">app</span>
<span class="k">def</span> <span class="nf">error</span><span class="p">():</span>
<span class="n">msg</span> <span class="o">=</span> <span class="s1">&#39;My error 500&#39;</span>
<span class="n">app</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
<span class="k">return</span>
</pre></div>
</div>
</div>
<div class="section" id="log-debug">
<h3><strong>Log debug</strong><a class="headerlink" href="#log-debug" title="Permalink to this headline"></a></h3>
<p>Show debug message in shell.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">easymacro</span> <span class="k">as</span> <span class="nn">app</span>
<span class="k">def</span> <span class="nf">error</span><span class="p">():</span>
<span class="n">msg</span> <span class="o">=</span> <span class="s1">&#39;Verify this data...&#39;</span>
<span class="n">app</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
<span class="k">return</span>
</pre></div>
</div>
</div>
<div class="section" id="log-info">
<h3><strong>Log info</strong><a class="headerlink" href="#log-info" title="Permalink to this headline"></a></h3>
<p>Show info message in shell.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">easymacro</span> <span class="k">as</span> <span class="nn">app</span>
<span class="k">def</span> <span class="nf">error</span><span class="p">():</span>
<span class="n">msg</span> <span class="o">=</span> <span class="s1">&#39;Start process...&#39;</span>
<span class="n">app</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span>
<span class="k">return</span>
</pre></div>
</div>
<div class="section" id="documents">
<h2>Documents<a class="headerlink" href="#documents" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="calc">
<h2>Calc<a class="headerlink" href="#calc" title="Permalink to this headline"></a></h2>
</div>
</div>
@ -89,8 +119,6 @@
<li class="toctree-l1"><a class="reference internal" href="config.html">Configuration</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Library easymacro.py</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#tools">Tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="#documents">Documents</a></li>
<li class="toctree-l2"><a class="reference internal" href="#calc">Calc</a></li>
</ul>
</li>
</ul>

View File

@ -1 +1 @@
Search.setIndex({docnames:["index","main/00_tools","main/config","main/easymacro","main/intro"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["index.rst","main/00_tools.rst","main/config.rst","main/easymacro.rst","main/intro.rst"],objects:{},objnames:{},objtypes:{},terms:{"2021":4,"extensi\u00f3n":2,"final":4,"function":4,"import":[1,3],"new":[2,4],"opci\u00f3n":2,"public":2,"return":[1,3],"true":2,FOR:2,For:2,Ons:2,The:2,Used:2,With:4,absolut:2,add:[2,4],addin:[2,4],addonmenu:2,all:2,along:2,alt:2,ani:2,app:[1,3],applic:2,apt:4,archlinux:4,argument:2,automat:2,automaticali:[],base:2,basic:4,befor:2,bin:2,blank:2,bmp:2,bool:2,box:[1,3],calc:[0,2,4],can:[2,4],clone:4,code:2,com:[],compon:[2,4],compress:4,conf:2,configur:0,content:0,context:2,copi:[2,4],correctli:2,cours:4,creat:[2,4],ctrl:2,cuat:4,current:2,def:[1,3],descript:2,detail:2,dev:4,develop:[2,4],dictionari:2,directori:4,displai:2,display_nam:2,displaynam:2,distribut:2,domain:4,don:4,done:4,download:4,draw:2,each:2,easymacro:[0,1],edit:2,either:2,elmau:[2,4],even:2,exactli:2,exampl:2,extens:0,extensionnam:2,file:4,file_test:2,first:0,fit:2,folder:2,forget:4,format:2,foundat:2,free:2,fresh:4,from:4,gener:[2,4],git:4,gitlab:[],gnu:2,gran:2,great:2,have:2,home:2,hope:2,http:[2,4],i18n:2,idl:2,idlc:2,imag:2,impli:2,impress:2,includ:2,index:0,info:[1,2,3,4],info_debug:[],inform:[],instal:[0,2],integ:2,intern:2,introduct:0,invers:2,kei:2,keyboard:2,label:2,languag:2,later:2,lib:2,librari:0,libreoffic:[2,4],libreofric:[],license_:2,license_en:2,like:2,link:2,local:4,logo:2,look:2,macro:[2,4],make:4,manag:2,mau:2,mauriciobaeza:[],menu_main:2,merchant:2,messag:[1,3],modifi:2,modul:0,more:2,move:[2,4],msgbox:[1,3],multi:2,myfirstextens:4,myfirstextension_v0:4,mygreatextens:2,name_16:2,name_26:2,net:[2,4],nombr:2,normal:2,now:4,ods:2,officemenubar:2,one:2,onli:2,open:2,option1:2,option:2,org:2,overview:0,oxt:4,pacman:4,page:[0,2],paramet:0,part:2,particular:2,pass:2,path_pygettext:2,pleas:2,png:2,possibl:2,pot:[2,4],project:[2,4],properti:2,provid:4,prueba:2,publish:2,purpos:2,python3:2,python:4,rapid:4,rdb:2,receiv:2,recomend:[],recommend:[2,4],redistribut:2,regmerg:2,rel:2,remerg:2,repositori:4,requir:0,same:2,script:4,sdk:[2,4],search:0,see:2,semant:2,set:2,share:2,shell:[1,3],shift:2,shortcut:2,should:2,show:[1,2,3],soffic:2,softwar:2,sourc:4,space:2,start:[2,4],string:2,successfulli:4,sucesfulli:[],sudo:4,support:4,t_shift_mod1_mod2:2,term:2,test:4,testext:[],text:2,thi:[2,4],titl:2,too:2,tool:[0,2],toolbar:2,tupl:2,two:2,type_extens:2,ubuntu:4,under:2,uniqu:2,unopkg:[2,4],urd:2,url:2,use:2,use_local:2,used:[2,4],useful:2,user:4,usr:2,valor:2,valu:2,vim:2,want:2,warranti:2,what:2,when:2,where:2,without:2,wizard:2,writer:2,www:2,you:[2,4],your:2,yournam:2,zaz:[2,4]},titles:["Welcome to ZAZ\u2019s documentation!","Debug","Configuration","Library easymacro.py","Introduction"],titleterms:{"default":2,"function":2,"new":[],author:2,calc:3,configur:2,creat:[],current:[],debug:[1,3],document:[0,3],domain:2,easymacro:3,extens:[2,4],file:2,first:4,icon:2,indic:0,info_debug:[1,3],inform:2,instal:4,introduct:4,librari:3,licens:2,local:2,main:2,menu:2,name:2,overview:4,paramet:2,parent:2,path:2,program:2,pygettext:2,requir:4,tabl:0,test:2,tool:3,type:2,version:2,welcom:0,zaz:0}})
Search.setIndex({docnames:["index","main/00_tools","main/config","main/easymacro","main/intro"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["index.rst","main/00_tools.rst","main/config.rst","main/easymacro.rst","main/intro.rst"],objects:{},objnames:{},objtypes:{},terms:{"2021":4,"500":[1,3],"extensi\u00f3n":2,"final":4,"function":4,"import":[1,3],"new":[2,4],"opci\u00f3n":2,"public":2,"return":[1,3],"true":2,FOR:2,For:2,Ons:2,The:2,Used:2,With:4,absolut:2,add:[2,4],addin:[2,4],addonmenu:2,all:2,along:2,alt:2,ani:2,app:[1,3],applic:2,apt:4,archlinux:4,argument:2,automat:2,automaticali:[],base:2,basic:4,befor:2,bin:2,blank:2,bmp:2,bool:2,box:[1,3],calc:[2,4],can:[2,4],clone:4,code:2,com:[],compon:[2,4],compress:4,conf:2,configur:0,content:0,context:2,copi:[2,4],correctli:2,cours:4,creat:[2,4],ctrl:2,cuat:4,current:2,data:[1,3],def:[1,3],descript:2,detail:2,dev:4,develop:[2,4],dictionari:2,directori:4,displai:2,display_nam:2,displaynam:2,distribut:2,domain:4,don:4,done:4,download:4,draw:2,each:2,easymacro:[0,1],edit:2,either:2,elmau:[2,4],error:[],even:2,exactli:2,exampl:2,extens:0,extensionnam:2,file:4,file_test:2,first:0,fit:2,folder:2,forget:4,format:2,foundat:2,free:2,fresh:4,from:4,gener:[2,4],git:4,gitlab:[],gnu:2,gran:2,great:2,have:2,home:2,hope:2,http:[2,4],i18n:2,idl:2,idlc:2,imag:2,impli:2,impress:2,includ:2,index:0,info:[2,4],info_debug:[],inform:[],instal:[0,2],integ:2,intern:2,introduct:0,invers:2,kei:2,keyboard:2,label:2,languag:2,later:2,lib:2,librari:0,libreoffic:[2,4],libreofric:[],license_:2,license_en:2,like:2,link:2,local:4,log:[],logo:2,look:2,macro:[2,4],make:4,manag:2,mau:2,mauriciobaeza:[],menu_main:2,merchant:2,messag:[1,3],modifi:2,modul:0,more:2,move:[2,4],msg:[1,3],msgbox:[1,3],multi:2,myfirstextens:4,myfirstextension_v0:4,mygreatextens:2,name_16:2,name_26:2,net:[2,4],nombr:2,normal:2,now:4,ods:2,officemenubar:2,one:2,onli:2,open:2,option1:2,option:2,org:2,overview:0,oxt:4,pacman:4,page:[0,2],paramet:0,part:2,particular:2,pass:2,path_pygettext:2,pleas:2,png:2,possibl:2,pot:[2,4],process:[1,3],project:[2,4],properti:2,provid:4,prueba:2,publish:2,purpos:2,python3:2,python:4,rapid:4,rdb:2,receiv:2,recomend:[],recommend:[2,4],redistribut:2,regmerg:2,rel:2,remerg:2,repositori:4,requir:0,same:2,script:4,sdk:[2,4],search:0,see:2,semant:2,set:2,share:2,shell:[1,3],shift:2,shortcut:2,should:2,show:[1,2,3],soffic:2,softwar:2,sourc:4,space:2,start:[1,2,3,4],string:2,successfulli:4,sucesfulli:[],sudo:4,support:4,t_shift_mod1_mod2:2,term:2,test:4,testext:[],text:2,thi:[1,2,3,4],titl:2,too:2,tool:[0,2],toolbar:2,tupl:2,two:2,type_extens:2,ubuntu:4,under:2,uniqu:2,unopkg:[2,4],urd:2,url:2,use:2,use_local:2,used:[2,4],useful:2,user:4,usr:2,valor:2,valu:2,verifi:[1,3],vim:2,want:2,warranti:2,what:2,when:2,where:2,without:2,wizard:2,writer:2,www:2,you:[2,4],your:2,yournam:2,zaz:[2,4]},titles:["Welcome to ZAZ\u2019s documentation!","Debug","Configuration","Library easymacro.py","Introduction"],titleterms:{"default":2,"function":2,"new":[],author:2,calc:[],configur:2,creat:[],current:[],debug:[1,3],document:0,domain:2,easymacro:3,error:[1,3],extens:[2,4],file:2,first:4,icon:2,indic:0,info:[1,3],info_debug:[1,3],inform:2,instal:4,introduct:4,librari:3,licens:2,local:2,log:[1,3],main:2,menu:2,name:2,overview:4,paramet:2,parent:2,path:2,program:2,pygettext:2,requir:4,tabl:0,test:2,tool:3,type:2,version:2,welcom:0,zaz:0}})

View File

@ -24,3 +24,48 @@ Show in shell.
def info():
app.debug(INFO_DEBUG)
return
**Log error**
^^^^^^^^^^^^^
Show error message in shell.
.. code-block:: python
import easymacro as app
def error():
msg = 'My error 500'
app.error(msg)
return
**Log debug**
^^^^^^^^^^^^^
Show debug message in shell.
.. code-block:: python
import easymacro as app
def error():
msg = 'Verify this data...'
app.debug(msg)
return
**Log info**
^^^^^^^^^^^^^
Show info message in shell.
.. code-block:: python
import easymacro as app
def error():
msg = 'Start process...'
app.info(msg)
return

View File

@ -7,11 +7,4 @@ Tools
.. include:: 00_tools.rst
Documents
---------
Calc
----
.. _Semantic Versioning: https://semver.org/