ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARIA-146) Support colorful execution logging
Date Tue, 25 Apr 2017 16:24:05 GMT

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

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

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

    https://github.com/apache/incubator-ariatosca/pull/109#discussion_r113235566
  
    --- Diff: aria/cli/color.py ---
    @@ -0,0 +1,73 @@
    +# Licensed to the Apache Software Foundation (ASF) under one or more
    +# contributor license agreements.  See the NOTICE file distributed with
    +# this work for additional information regarding copyright ownership.
    +# The ASF licenses this file to You under the Apache License, Version 2.0
    +# (the "License"); you may not use this file except in compliance with
    +# the License.  You may obtain a copy of the License at
    +#
    +#     http://www.apache.org/licenses/LICENSE-2.0
    +#
    +# Unless required by applicable law or agreed to in writing, software
    +# distributed under the License is distributed on an "AS IS" BASIS,
    +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +# See the License for the specific language governing permissions and
    +# limitations under the License.
    +from StringIO import StringIO
    +
    +import colorama
    +
    +colorama.init()
    +
    +
    +def _get_colors(color_type):
    +    for name in dir(color_type):
    +        if not name.startswith('_'):
    +            yield (name.lower(), getattr(color_type, name))
    +
    +
    +class Color(object):
    +    Fore = colorama.Fore
    +    Back = colorama.Back
    +    Style = colorama.Style
    +
    +    _colors = {
    +        'fore': dict(_get_colors(Fore)),
    +        'back': dict(_get_colors(Back)),
    +        'style': dict(_get_colors(Style))
    +    }
    +
    +    class Schema(object):
    +        def __init__(self, **kwargs):
    --- End diff --
    
    extract kwargs


> Support colorful execution logging
> ----------------------------------
>
>                 Key: ARIA-146
>                 URL: https://issues.apache.org/jira/browse/ARIA-146
>             Project: AriaTosca
>          Issue Type: Story
>            Reporter: Ran Ziv
>            Assignee: Maxim Orlov
>            Priority: Minor
>
> Add support for printing execution logs in color



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

Mime
View raw message