Simplification of the get-logstamp function