  A condition, in two variants, is given such that if a property P satisfies
this condition, then every logic which is at least as strong as first-order
logic and can express P fails to have the compactness property. The result is
used to prove that for a number of natural properties P speaking about
automorphism groups or connectivity, every logic which is at least as strong as
first-order logic and can express P fails to have the compactness property. We
also give an example of a logic that extends first-order logic, has the
compactness property and can express the property "the cardinality of the
automorphism group is at most $2^{\aleph_0}$".
