summaryrefslogtreecommitdiffstats
path: root/cobbler/collection.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2007-12-10 17:14:31 -0500
committerMichael DeHaan <mdehaan@redhat.com>2007-12-10 17:14:31 -0500
commitedc50892ad62f88ce9d8eb0977c96bc8a1b04ee0 (patch)
tree7aa3ae4b6e58c93e9a30d9615cba00a5c3259e9b /cobbler/collection.py
parentb2be694e8ffa82f25e86b042e6c8fba922f3f439 (diff)
downloadthird_party-cobbler-edc50892ad62f88ce9d8eb0977c96bc8a1b04ee0.tar.gz
third_party-cobbler-edc50892ad62f88ce9d8eb0977c96bc8a1b04ee0.tar.xz
third_party-cobbler-edc50892ad62f88ce9d8eb0977c96bc8a1b04ee0.zip
API and web svc now use seperate logging, and logging is greatly enhanced and more usable.
Diffstat (limited to 'cobbler/collection.py')
-rw-r--r--cobbler/collection.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/cobbler/collection.py b/cobbler/collection.py
index 3f5b192..41154ab 100644
--- a/cobbler/collection.py
+++ b/cobbler/collection.py
@@ -35,6 +35,7 @@ class Collection(serializable.Serializable):
"""
self.config = config
self.clear()
+ self.log_func = self.config.api.log
def factory_produce(self,config,seed_data):
"""
@@ -112,6 +113,9 @@ class Collection(serializable.Serializable):
So, in that case, don't run any triggers and don't deal with any actual files.
"""
+
+
+
if ref is None or not ref.is_valid():
raise CX(_("insufficient or invalid arguments supplied"))
@@ -125,6 +129,7 @@ class Collection(serializable.Serializable):
# perform filesystem operations
if with_copy:
+ self.log_func("saving %s %s" % (self.collection_type(), ref.name))
# failure of a pre trigger will prevent the object from being added
if with_triggers:
self._run_triggers(ref,"/var/lib/cobbler/triggers/add/%s/pre/*" % self.collection_type())