Geico Corp. posted second-quarter and six-month profits slightly ahead of last year's, but LogEtronics Inc. lost money in the quarter and had reduced earnings in the half, company officials reported yesterday.

Interest expenses and income taxes on a foreign subsidiary slashed Springfield-based LogEtronics' operating income of $329,000 to a $31,000 loss in the second quarter. Last year, LogE had a profit of $195,000 (17 cents a share) in the second quarter.

For the half, LogE posted earnings of $182,000 (14 cents), compared with $1.4 million (36 cents) last year.

Revenues in both reporting periods climbed from last year's levels. For the quarter, revenues were $9.7 million against $8 million; in the half, revenues grew to $21.1 million from $15.4 million. Company officials attributed those gains to the acquisition of a computer-imaging subsidiary late in 1981.

Geico, the D.C.-based insurer, reported net income of $19 million (92 cents) for the second quarter, compared with $18.2 million (83 cents) last year. In the half, Geico earned $35.9 million ($1.74) compared with $34.6 million ($1.58). For both periods, fewer shares were outstanding in 1982.

Chairman John J. Byrne said, "Property and casualty premiums increased 11 percent, partially due to our purchase of Equitable General Insurance Co." in April.