"""
This is where the implementation of the plugin code goes.
The MyPythonPlugin-class is imported from both run_plugin.py and run_debug.py
"""
import sys
import logging
from webgme_bindings import PluginBase

# Setup a logger
logger = logging.getLogger('MyPythonPlugin')
logger.setLevel(logging.INFO)
handler = logging.StreamHandler(sys.stdout)  # By default it logs to stderr..
handler.setLevel(logging.INFO)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
handler.setFormatter(formatter)
logger.addHandler(handler)


class MyPythonPlugin(PluginBase):
    def main(self):
        core = self.core
        root_node = self.root_node
        active_node = self.active_node

        name = core.get_attribute(active_node, 'name')

        logger.info('ActiveNode at "{0}" has name {1}'.format(core.get_path(active_node), name))

        core.set_attribute(active_node, 'name', 'newName')

        commit_info = self.util.save(root_node, self.commit_hash, 'master', 'Python plugin updated the model')
        logger.info('committed :{0}'.format(commit_info))

06a918611093557aba62170cc64f2517a74a5f56
<mask token>


class MyPythonPlugin(PluginBase):

    def main(self):
        core = self.core
        root_node = self.root_node
        active_node = self.active_node
        name = core.get_attribute(active_node, 'name')
        logger.info('ActiveNode at "{0}" has name {1}'.format(core.get_path
            (active_node), name))
        core.set_attribute(active_node, 'name', 'newName')
        commit_info = self.util.save(root_node, self.commit_hash, 'master',
            'Python plugin updated the model')
        logger.info('committed :{0}'.format(commit_info))

<mask token>
logger.setLevel(logging.INFO)
<mask token>
handler.setLevel(logging.INFO)
<mask token>
handler.setFormatter(formatter)
logger.addHandler(handler)


class MyPythonPlugin(PluginBase):

    def main(self):
        core = self.core
        root_node = self.root_node
        active_node = self.active_node
        name = core.get_attribute(active_node, 'name')
        logger.info('ActiveNode at "{0}" has name {1}'.format(core.get_path
            (active_node), name))
        core.set_attribute(active_node, 'name', 'newName')
        commit_info = self.util.save(root_node, self.commit_hash, 'master',
            'Python plugin updated the model')
        logger.info('committed :{0}'.format(commit_info))

<mask token>
logger = logging.getLogger('MyPythonPlugin')
logger.setLevel(logging.INFO)
handler = logging.StreamHandler(sys.stdout)
handler.setLevel(logging.INFO)
formatter = logging.Formatter(
    '%(asctime)s - %(name)s - %(levelname)s - %(message)s')
handler.setFormatter(formatter)
logger.addHandler(handler)


class MyPythonPlugin(PluginBase):

    def main(self):
        core = self.core
        root_node = self.root_node
        active_node = self.active_node
        name = core.get_attribute(active_node, 'name')
        logger.info('ActiveNode at "{0}" has name {1}'.format(core.get_path
            (active_node), name))
        core.set_attribute(active_node, 'name', 'newName')
        commit_info = self.util.save(root_node, self.commit_hash, 'master',
            'Python plugin updated the model')
        logger.info('committed :{0}'.format(commit_info))

<mask token>
import sys
import logging
from webgme_bindings import PluginBase
logger = logging.getLogger('MyPythonPlugin')
logger.setLevel(logging.INFO)
handler = logging.StreamHandler(sys.stdout)
handler.setLevel(logging.INFO)
formatter = logging.Formatter(
    '%(asctime)s - %(name)s - %(levelname)s - %(message)s')
handler.setFormatter(formatter)
logger.addHandler(handler)


class MyPythonPlugin(PluginBase):

    def main(self):
        core = self.core
        root_node = self.root_node
        active_node = self.active_node
        name = core.get_attribute(active_node, 'name')
        logger.info('ActiveNode at "{0}" has name {1}'.format(core.get_path
            (active_node), name))
        core.set_attribute(active_node, 'name', 'newName')
        commit_info = self.util.save(root_node, self.commit_hash, 'master',
            'Python plugin updated the model')
        logger.info('committed :{0}'.format(commit_info))

"""
This is where the implementation of the plugin code goes.
The MyPythonPlugin-class is imported from both run_plugin.py and run_debug.py
"""
import sys
import logging
from webgme_bindings import PluginBase

# Setup a logger
logger = logging.getLogger('MyPythonPlugin')
logger.setLevel(logging.INFO)
handler = logging.StreamHandler(sys.stdout)  # By default it logs to stderr..
handler.setLevel(logging.INFO)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
handler.setFormatter(formatter)
logger.addHandler(handler)


class MyPythonPlugin(PluginBase):
    def main(self):
        core = self.core
        root_node = self.root_node
        active_node = self.active_node

        name = core.get_attribute(active_node, 'name')

        logger.info('ActiveNode at "{0}" has name {1}'.format(core.get_path(active_node), name))

        core.set_attribute(active_node, 'name', 'newName')

        commit_info = self.util.save(root_node, self.commit_hash, 'master', 'Python plugin updated the model')
        logger.info('committed :{0}'.format(commit_info))
