I have a custom module that interacts with some third-party service. Please look at this function:

function mymodule_connect_entity_update($entity, $type) {
  // Update the entity's entry in a fictional table of all entities.

  //here's some call to external service and I'd like to log results.

I want to log information from $entity and other info. I'd like to know what is the best way to do this. This site is hosted on Acquia if it affects the decision. Someone recommended syslog, but I'm not sure about that, I'd like to have a separate log for this activity. My idea is to create a custom logger, and configure Linux logrotator to handle rotation. The thing is that I don't have permissions to configure rotator, and I'll have to support my decision in order to convince the System Administrator, and I'd like to know other approaches and their advantages.

1 Answer 1


For logging you could use Watchdog. The first parameter $type can be used as a filter on the report page which is often handy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.