actors log class and fuctions

Bloccato actors log class and fuctions

  • Donnerstag, 2. August 2012 12:16
     
     

    I've been using the actors::log::post function throughout application I've targeted to run in Azure. While running the application in the local Azure emulator and the real Azure environment I encountered the following issue/difference between azure and the local emulator:

    All calls to actors::log::post() inside class functions where the class is derived from actors::actor and is spawned using actors::actor::spawn will NOT be written to the appropriate log blob in wad-casablanca-logs in azure but will show up in the emulator. here's short code sample:

    the class spawned:

    class MyClass: public actors::actor
    {
    public:

        MyClass() {}

        static actors::actor *factory() { new MyClass(); }

    protected:

        void initialize(actor::init_reason rsn) { }  

        virtual void execute() 
        {
    AzureBlobLog(string("Running MyClassIn Azure"));
            Done();
        }
    private:
    };

    the actual code in on_initialize (where p is static actors::PID):

     p = actors::actor::spawn<MyClass>();

    And also interesting to see that the the actual log blob name in Azure contains both the deployment ID and the instance ID. how can one get access to those values? I couldn't see them exposed in the casablanca API.

    Yoav

Alle Antworten

  • Montag, 6. August 2012 14:26
     
     

    Yoav,

    Sorry for not getting back to you on this. We're not ignoring you, it's just been a hectic few days and we haven't had time to look at this problem.

    Niklas

  • Dienstag, 7. August 2012 13:44
     
     

    It's OK. Know that feeling :)

    Let me know about it - it's quite important when having multi-instance worker role. Right now I've implemented a simple blob log of myself but I cannot use it for multi-instance worker role (need separate blobs for that and no access to deployment or instance IDs)

    Yoav