Search code examples
ibm-cloudcloud-foundry

Can user provided services be shared across multiple apps


I am creating a logdrain service in Bluemix for my apps:

`cf cups myapps-logdrain -l <logdrain-endpoint>`

Can I bind the myapp-logdrain service to multiple apps at a time? I looked at the cloudfoundry documentation and played with the logdrain service from cf cli. Its settings don't specify whether or not it can be shared.


Solution

  • Yes. Log drain service(user provided service) can be shared just like any other service.

    You can differentiate logs from different applications by querying for application GUID and/or instance number.

    You may see logs similar to following format:

    [Date][log-service-name][application guid][app-instance-number][log-message]

    Apr 21 00:35:44 bluemixlogs 3398064b-8de6-46dd-egf1-0dde35546496/[App/0]: sending logs to 3rd party service : some log info