~niedbalski/charms/trusty/glance/fix-lp-1308557

« back to all changes in this revision

Viewing changes to hooks/charmhelpers/core/hookenv.py

  • Committer: James Page
  • Date: 2014-02-17 15:11:33 UTC
  • mfrom: (43.1.3 glance-syslog)
  • Revision ID: james.page@canonical.com-20140217151133-u94ewuf0zm2037qh
[yolanda.robla] Add support for syslog logging

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
import json
9
9
import yaml
10
10
import subprocess
 
11
import sys
11
12
import UserDict
12
13
from subprocess import CalledProcessError
13
14
 
149
150
    return local_unit().split('/')[0]
150
151
 
151
152
 
 
153
def hook_name():
 
154
    """The name of the currently executing hook"""
 
155
    return os.path.basename(sys.argv[0])
 
156
 
 
157
 
152
158
@cached
153
159
def config(scope=None):
154
160
    """Juju charm configuration"""