How is the "loss" calculated which is supplied by the callback log in Keras?
Yes, it is the loss function you pass to model.compile.

See here for loss metric usage examples. You can also define your own metric (see "Custom metrics" at the bottom of the page from the last link).

You can read about the Model class documentation here. The first method is the compile method with argument descriptions.

If you want to dig deeper into Keras callbacks and the built-in loss functions, check out these sources:

losses source code

Keras callbacks