[ 
https://issues.apache.org/jira/browse/ARIA-138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15976429#comment-15976429
 ] 

ASF GitHub Bot commented on ARIA-138:
-------------------------------------

Github user mxmrlv commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/104#discussion_r112408993
  
    --- Diff: aria/cli/execution_logging.py ---
    @@ -14,53 +14,68 @@
     # limitations under the License.
     
     import os
    +from StringIO import StringIO
     
     from . import logger
     from .env import env
     
     DEFAULT_FORMATTING = {
    -    logger.NO_VERBOSE: {'main_msg': '{item.msg}'},
    +    logger.NO_VERBOSE: {'message': '{item.msg}'},
         logger.LOW_VERBOSE: {
    -        'main_msg': '{created_at} | {item.level[0]} | {item.msg}',
    -        'created_at': '%H:%M:%S'
    -    }
    +        'message': '{timestamp} | {item.level[0]} | {item.msg}',
    +        'timestamp': '%H:%M:%S'
    +    },
    +    logger.MEDIUM_VERBOSE: {
    +        'message': '{timestamp} | {item.level[0]} | {item.msg} | 
{implementation}',
    +        'timestamp': '%H:%M:%S'
    +    },
    +    logger.HIGH_VERBOSE: {
    +        'message': '{timestamp} | {item.level[0]} | {item.msg} | 
{implementation}({inputs})',
    +        'timestamp': '%H:%M:%S'
    +    },
     }
     
     
    -class load(object):
    +def _str(item, formatting=None):
    +    # Only NO_VERBOSE and LOW_VERBOSE are configurable formats. configuring
    +    # the low verbose level should affect any higher level.
    +    formats = formatting or DEFAULT_FORMATTING
    +    formatting = formats[env.logging.verbosity_level]
    +    msg = StringIO()
     
    -    def __init__(self, item, formats=None):
    -        self._item = item
    -        self._formats = formats or DEFAULT_FORMATTING
    +    kwargs = dict(item=item)
    --- End diff --
    
    rename


> CLI output verbosity levels
> ---------------------------
>
>                 Key: ARIA-138
>                 URL: https://issues.apache.org/jira/browse/ARIA-138
>             Project: AriaTosca
>          Issue Type: Story
>            Reporter: Maxim Orlov
>            Assignee: Maxim Orlov
>
> The CLI should support the display of the following logging levels:
> default: execution logs: simple representation of executed operations
> -v      : execution logs: representation with time stamps and logging levels
> -vv    : execution logs: retrieve the stacktrace of any failed operation.
> -vvv  : all configured loggers should be set to {{debug}} level; any CLI 
> errors should be logged and printed with their stack trace as well.
> (both the default and the first level of logging format should be 
> configurable). 
> Note that all of the operations logs should be saved in the storage. This 
> issue relates only to the way the logs are displayed in the CLI.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to